Add conditions before submitting Contact Form 7
-
Hello,
I’d like to put recaptcha v3 only on pages where there’s a form, so I can’t use the recapatcha integrator.
Using jQuery, I’m able to retrieve the recaptcha response, but now I’d like to be able to add a condition for the form to submit.
To put it simply, once I’ve retrieved the recaptcha response, I’ll generate a boolean (true or false) and I’d like the contact 7 form to submit only if my boolean is true.
I’ve tried several methods, but the form is always sent despite my condition, or it’s never sent at all.
Set e.preventDefault() on the form when I submit it, and submit it using jQuerry.
Put e.preventDefault() on the submit button when it’s clicked, then submit it using jQuerry.
Both at the same time
Add a timeout
Add conditions with wpcf7-invalid / submit and so onCan anyone help me?
- The topic ‘Add conditions before submitting Contact Form 7’ is closed to new replies.