I am using the contact form 7 plugin for wordpress.
I need a fake submit button i.e. a button that does the validation check on the fields after which, if everything is ok, the user will be redirected to another url otherwise he will stay on the current page and see the input errors.
All this without sending the form data.
What can I do?
Thank you
2
Answers
With CF7 most of the form validation is done on the server side, so there’s no way to validate a form without actually sending the form data. This is done via AJAX. You can, however, add a DOM listener that will redirect the user after that validation succeeds: https://contactform7.com/dom-events/
set the attribute "required" in input or texarea