Allow a link to be connected to a delete button

When using a submit button it is possible to add a success message, or link to another page. When using a delete button, there is not this option, so the user gets stuck on the page, having to use the main menu to navigate back to where they want to be.

Connect the delete button to code instead and after the deletion is done show message or redirect user to another page.