Hi I have 2 forms on one page. Contact form 7 and a Mailchimp form
Mailchimp form recaptcha does not work because I think it is appearing twice:
Contact Form 7
<script type="text/javascript" async src="https://www.gstatic.com/recaptcha/api2/r20170213115309/recaptcha__en.js"></script>
Mailchimp form
<script type="text/javascript" async src="https://www.gstatic.com/recaptcha/api2/r20170213115309/recaptcha__en.js"></script>
Errors in console:
Uncaught Error: ReCAPTCHA placeholder element must be empty
On pages without contact form 7 the Mailchimp recaptcha works fine.
Any ideas? do I have to deregister the contact form 7 script in functions file? Or can I do with jquery?
I managed a hack workaround.
By loading recaptcha on all pages except the contact form page so contact form 7 and mailchimp share same script and not load twice. I added this to the head.php in WP
if( !is_page( array( 'contact-australia',))){ ?>
<script src="https://www.google.com/recaptcha/api.js" async ></script>
<?php } ?>
you can try to use Contact Form 7 MailChimp Extension https://uk.wordpress.org/plugins/contact-form-7-mailchimp-extension/