acf-recaptcha
acf-recaptcha copied to clipboard
Issues with Multiple Recaptchas
I have a page template with acf_form() on it twice. Once is 'form'=> false BECAUSE it is inside another form. How can I get that to work?
Nevermind, I got it to work.
What I did was make two separate field groups, and added the recaptcha field to each, AND THEN somehow it was no problem.
AS IN one field group for your form, and TWO field groups with recaptchas for the page the form appears on. Not sure why, but it works.
I'm not sure why you need to call acf_form() twice - that would trigger the validation of the same reCAPTCHA code twice, which would obviously fail on the second time.
Perhaps you can show me a screenshot or some code to illustrate your setup?
Well, it is because I had two forms on one page. So to avoid using the same recaptcha I made ANOTHER fields that IS ALSO a recaptcha.
I no longer need two forms on one page. So, now I only need one recaptcha. Maybe you could leave instructions for others on how to have two instances of acf_form and whether or not the recaptcha in them has to be a different fields etc.
http://cnyc.unaomnia.com/list/show/
Won't be at that address long but that is what I am making.
Sorry, I misunderstood what you said earlier, I thought you were referring to acf_form_head() (I haven't touched WordPress in months). Correct, you should be able to have multiple forms (using multiple acf_form()s) on the same page and acf-recaptcha should still work.
What is the error you are getting?
I'm having this exact problem. I have 2 forms in a modal, loaded in the footer. They're interfering. See the added image for the error.
I'll take a look at this after my exams, maybe next week. Any chance you can come up with a minimal PoC in the mean time would be great.
If you wanna submit a PR that'll be even better!