amiroperator amiroperator - 8 months ago 105
HTML Question

Multiple instane of Google reCaptcha

I used google reCaptcha for my website and my login and register form are in same page and when I use reCaptcha twice, the second captcha doesn't work.

I used this code for login and register form:

<div class="g-recaptcha" data-sitekey="********"></div>

Any body can help me to solve it ?


By using the following code I fixed that problem:


<div id="captcha"></div>


var captchaCallback = function() {
    grecaptcha.render('captcha', {
        'sitekey' : ''


<script src="//" async defer></script>