amiroperator amiroperator - 1 year ago 157
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 ?

Answer Source

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>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download