The below code doesn't appear to be working for me, it will delete all other blocks apart from itself. I just need it to delete itself.
trophyOrders
is the Matrix field in the user account.
{% set orders = user.trophyOrders.all() %}
{# Loop through orders #}
{% for order in orders %}
<form method="post" accept-charset="UTF-8" id="form-{{ order.id }}" class="f-left">
{{ csrfInput() }}
{{ actionInput('users/save-user') }}
{{ redirectInput('account/manage-trophies?msg=entry-deleted') }}
{{ hiddenInput('userId', currentUser.id) }}
{{ hiddenInput('fields[trophyOrders][sortOrder][]', order.id) }}
{{ hiddenInput('fields[trophyOrders][blocks][' ~ order.id ~'][type]', '0') }}
<button type="submit" class="btn-unstyled"><i class="fal fa-trash-alt"></i></button>
</form>
{% endfor %}
Thanks