I have a form that has a normal submit button, but also several ajax methods that submit the form as well. I need to do some pre-save validation stuff. Will the onSubmit function be called every time the form is submitted or do I need to manually call the method before my ajax form submissions?
Share
The
onsubmitevent only happens when you submit the form manually.If you call the
submitmethod to submit the form, theonsubmitevent is not triggered.If you are making an AJAX call using the data from the form, the form isn’t even submitted at all.