Contact Form 7 + Google reCAPTCHA – How do I set up server-side configuration?

Thank you for reading my problem in advance. I am trying to incorporate Google’s new reCAPTCHA (https://www.google.com/recaptcha/) into a WordPress site that is using Contact Form 7. I have inserted the front-end code provided by Google:

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

However, I can’t figure out how to get the server-side integration configured. From what I can tell, I need to insert this code into my contact form HTML (see https://code.google.com/p/recaptcha/wiki/HowToSetUpRecaptcha#Part_2:_Installation):

Read More
<?php
 require_once('recaptchalib.php');
 $publickey = "YOUR_PUBLIC_KEY"; // you got this from the signup page
 echo recaptcha_get_html($publickey);?>

When I do that on the Contact Form 7 backend, it just displays the text in between “< ?” and “? >”. I’m also a little confused about the other steps and there are not many resources online about this new captcha.

Thanks again.

-Trent

Related posts

Leave a Reply