Title: JavaScript console errors when reCatptcha enabled
Last modified: September 23, 2019

---

# JavaScript console errors when reCatptcha enabled

 *  [chillibyte](https://wordpress.org/support/users/chillibyte/)
 * (@chillibyte)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/javascript-console-errors-when-recatptcha-enabled/)
 * There are many errors per second being logged to the JS console on (all) pages
   on the site in question.
 *     ```
       recaptcha__en.js:523 Uncaught Error: reCAPTCHA has already been rendered in this element 
       at Object.t4 [as render] (recaptcha__en.js:523) 
       at HTMLDivElement.<anonymous> (gravityforms.min.js?ver=2.4.12:1) 
       at Function.each (jquery.min.js?ver=1.10.2:4) 
       at init.each (jquery.min.js?ver=1.10.2:4) 
       at renderRecaptcha (gravityforms.min.js?ver=2.4.12:1) 
       at (index):2538 
       ```
   
 * This is due to the following code block being inserted multiple times on the 
   page
 *     ```
       <script type="text/javascript"> 
       ( function( $ ) { 
         $( document ).bind( 'gform_post_render', function() { 
           var gfRecaptchaPoller = setInterval( function() { 
             if( ! window.grecaptcha || ! window.grecaptcha.render ) { 
               return; 
             } 
             renderRecaptcha(); 
             clearInterval( gfRecaptchaPoller ); 
           }, 100 ); 
         } ); 
       } )( jQuery ); 
       </script>
       ```
   
 * This code is inserted once for each form on the page.
 * Looking through the Gravity Forms plugin source, this seems to be generated by
   the ‘ensure_recaptcha_js’ function at line 253 of class-gf-field-captcha.php.
 * I contacted Gravity Forms support and they informed me that:
    _The error you’re
   seeing is the result of embedding the same form more than once in the page. As
   you know GF doesn’t support embedding the same form multiple times in the same
   page, and reCAPTCHA doesn’t like that either. I can see that you have the Gravity
   Forms: Multiple Form Instances: by tyxla to workaround the limitation of not 
   being able to embed the same form more than once, but that doesn’t seem to help
   with reCAPTCHA.
 * and to contact the author of the “Gravity Forms: Multiple Form Instances” plugin
   for assistance.
 * Any pointers?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-console-errors-when-recatptcha-enabled%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [jekamabu](https://wordpress.org/support/users/jekamabu/)
 * (@jekamabu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/javascript-console-errors-when-recatptcha-enabled/#post-11964443)
 * Hello chillibyte!
    i had the same bug in my site and finally I’ve solved, the
   problem is exactly what Gravity form support informed you, you cant use many 
   captcha forms in same page, you need to check where you’re loading the forms 
   that are using captcha and if it’s necessary to make a conditional (via code)
   for loading the form depends of its function. I could help you via Codeable, 
   here my profile, I can check your site and give you an estimate for helping to
   solve. [https://codeable.io/developers/juan-david-rendon/](https://codeable.io/developers/juan-david-rendon/)
   Best Regards!

Viewing 1 replies (of 1 total)

The topic ‘JavaScript console errors when reCatptcha enabled’ is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-multiple-form-instances/assets/icon-256x256.
   png?rev=1218582)
 * [Gravity Forms: Multiple Form Instances](https://wordpress.org/plugins/gravity-forms-multiple-form-instances/)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-multiple-form-instances/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-multiple-form-instances/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-multiple-form-instances/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-multiple-form-instances/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [jekamabu](https://wordpress.org/support/users/jekamabu/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/javascript-console-errors-when-recatptcha-enabled/#post-11964443)
 * Status: not resolved