How to reload the google recaptcha widget after user submits invalid inputs

前端 未结 11 1650
既然无缘
既然无缘 2020-12-25 12:08

I have a registration form with the new google recaptcha widget on it. When a user submits info, we check the validation with javascript and return the problems to the page

11条回答
  •  醉话见心
    2020-12-25 12:55

    your recaptcha render js event should be called only once in the script, your recaptcha code is not valid if grecaptcha.render js event called second time in script. You should have to check your code so it should not call the grecaptcha.render function second time on validation check.

    OR

    In console, You will see a Uncaught ReferenceError: Recaptcha is not defined error message, which indicates the problem with the reCAPTCHA script. This is caused due to a bad url in the page - http://api.recaptcha.net/js/recaptcha_ajax.js . Google has updated the reCAPTCHA and moved the location of the script to http://www.google.com/recaptcha/api/js/recaptcha_ajax.js .

    also check this post

    http://www.instructables.com/id/Fix-reCAPTCHA-errors-on-Instructables/

    and this post

    Uncaught ReferenceError: Recaptcha is not defined

提交回复
热议问题