before submit form code example
Example 1: form confirm before submit
<form
method="post"
onSubmit="return confirm('Are you sure you wish to delete?');">
...
</form>
Example 2: buttons js before submit
$('#myform').submit(function() {
// DO STUFF...
return true; // return false to cancel form action
});
Example 3: buttons js before submit
<form id="myform">
...
</form>