forms icon indicating copy to clipboard operation
forms copied to clipboard

Recaptcha not submitting with multiple forms on a single page

Open sJones1997 opened this issue 4 years ago • 1 comments

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.

sJones1997 avatar Nov 10 '21 15:11 sJones1997

Hi, @sJones1997

If you have a fix, please make a PR and we'll happily merge it in! :-)

bobdenotter avatar Nov 10 '21 16:11 bobdenotter