Trigger Ajax form submit by Javascript
-
Hello,
I have a Forminator form which has all the fields pre-filled from URL query and should submit itself automatically after page load. How should I accomplish this?I tried calling this:
document.getElementById('forminator-module-468').submit()
which works, but it ignores form validation and submits the form even if some required field is not filled. Moreover, it seems that this method does not use Ajax, but instead reloads the entire page.How to emulate “normal” form submit, i.e. a normal user click on submit button, which firstly checks if all fields are properly filled in, and only if everything validates, submits the form via Ajax and displays result above the form? Note that I have set the form submission method to Ajax.
- The topic ‘Trigger Ajax form submit by Javascript’ is closed to new replies.