Reputation: 4747
I have a payment form where I want to listen to the form submit event for metrics purposes, even though the form validation failed (I want to see intentions of paying).
My form header:
<form id="payment-form" class="form-with-validation" name="paymentForm" ng-submit="submitPaymentForm()">
I do have required
on some form fields.
But even I keep the Submit button as always enabled, Angular catches the event and submitPaymentForm()
never triggers:
What to do?
Upvotes: 0
Views: 566
Reputation: 21901
add novalidate
like below. Note that novalidate is used to disable browser's native form validation.
<form id="payment-form" novalidate ...
Upvotes: 1