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

前端 未结 11 1653
既然无缘
既然无缘 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:45

    The method you are looking for is grecaptcha.reset()

    However, in order for this function to work you have to render the reCaptacha explicitly like this :

提交回复
热议问题