2👍
✅
You need to add type="submit"
to the submit button, and add type="button"
to the delete button.
By default, a button inside a form will trigger a submit if there isn’t a explicit submit button
👤nip
1👍
to prevent delete button from submit change it type to button insted of submit
<button onclick="somefunction()" type="button">Button</button>
Source:stackexchange.com