[Vuejs]-Html form two buttons only one to submit

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>

Leave a comment