Skip to content
Advertisement

Google reCaptcha V2 (Invisible) only fires once

today i tried to implement Google ReCAPTCHA V2 in ivisible mode. In the documentation, they showed, how to use it.

<button class="g-recaptcha" data-sitekey="your_site_key" data-callback='onSubmit'>Submit</button>

I tried this solution, but the “onSubmit” function only gots called once. After that, the Button simply does nothing…

Its there a way to fix that Issue without reloading the page?

Thanks,

Sascha

Advertisement

Answer

I have hit the same problem today. Looks like they’ve changed their API recently.

I fixed this problem by adding grecaptcha.reset(); in the end of the onSubmit function. The problem is that captcha doesn’t call back anymore when it is triggered once, so it needs to be reloaded.

Advertisement