Conflict with Contact Form 7
-
We have been using Simple Google Recaptcha (v2.7) alongside Contact Form 7 with reCaptcha integration enabled. It has been working fine. Today I have upgraded to Simple Google Recaptcha (v.2.8) and now get a javascript error:
Uncaught Error: reCAPTCHA has already been rendered in this element
Looking at the code I think the problem could be traced back to the function “frontend_sgr_script”, in version 2.7 you only enqueue the “main.js” script in certain circumstances but now it appears that script is enqueued on any page for non-logged in users. As a result when the “sgr” javascript function is called it is trying to render again for the Contact Form 7 forms.
Both the div your plugin creates and the one Contact Form 7 creates use the class name “g-recaptcha”. I was wondering if it would be possible for you to change the class name you use to avoid this conflict? Or do you know of a way to get the 2 plugins working together?
Thank you
Mark
- The topic ‘Conflict with Contact Form 7’ is closed to new replies.