Multiple recaptcha same page

Home Forums EZY – Responsive Multi-Purpose HTML5 Template Multiple recaptcha same page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10028974
    drug22
    Participant

    Hello,
    I wonder if its possible to use multiple recaptcha on same page. I used the example form here “https://stackoverflow.com/questions/1241947/how-do-i-show-multiple-recaptchas-on-a-single-page”, but, the firs form is working, but the second its says “Please click on the reCAPTCHA box.”. Any advice?
    Thanks, and sorry for my bad english


    #10028978
    Support2
    Keymaster

    Hello, thanks for your purchase.

    1) Change the HTML of recaptcha script with this new code below:
    From this:

    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script>

    To this:

    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
    <script type="text/javascript">
        var CaptchaCallback = function() {
            grecaptcha.render('g-recaptcha1', {'sitekey' : 'YOUR_API_KEY'});
            grecaptcha.render('g-recaptcha2', {'sitekey' : 'YOUR_API_KEY'});
        };
    </script>

    2) Change the HTML inside the form of recaptcha field:
    From this:

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

    To this:

    <div id="g-recaptcha1"></div>
    
    and for the second form
    
    <div id="g-recaptcha2"></div>

    3) Comment the recaptcha code in (js/views/view.contact.js):

    Please, try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    #10028981
    drug22
    Participant

    thank you for fast reply!!! Its working now.


Viewing 3 posts - 1 through 3 (of 3 total)

This topic is marked as "RESOLVED" and can not rceive new replies.