forms
forms copied to clipboard
Recaptcha not submitting with multiple forms on a single page
When there are multiple forms on a page (let's say form A and B), both with a Recaptcha field. When the submit button is clicked on form A, the page will reload with validation errors on form B.
I traced the issue to the function "onRecaptchaSubmitted", as this function is loaded up for each form that contains a Recaptcha field, so, when one form is submitted each instance of the function was called.
Have got a fix ready, where the form name is included in each function to prevent multiple submits.
Hi, @sJones1997
If you have a fix, please make a PR and we'll happily merge it in! :-)