Have you been struggling to add reCAPTCHA v2 to your Contact Form 7? In this short post, we’ll guide you through the step-by-step process on how to properly add reCAPTCHA v2 to your WordPress Contact Form 7.
Adding reCAPTCHA to your Contact Form 7 can be really useful in preventing spam submissions from bots. However, in order for it to work, you must integrate it with Contact Form 7 correctly. But don’t worry, adding reCAPTCHA for Contact Form 7 isn’t a complicated process.
You can do it in three simple steps. First, you’ll need to register your site on Google and get the API keys, then you’ll need to add the keys to your website, and finally add reCAPTCHA to your Contact Form 7. Here’s the step-by-step guide:
Step 1. Generate reCAPTCHA API Keys
You need API keys from Google to integrate reCAPTCHA with your Contact Form 7. To do that, you’ll need to visit the Google reCAPTCHA admin page and register your site with Google. Here’s how to obtain API keys:
- Visit the Google reCAPTCHA page.
- Sign in to your Google account.
- Click on the “+” (plus) button to create a new site.
- Choose “reCAPTCHA v2” and then choose “I’m not a robot” Checkbox.
- Enter your domain in the “Domains” field. Make sure you enter the address correctly.
- Accept the reCAPTCHA Terms of Service.
- Click on “Submit”.
Once you click on “Submit”, the page will generate your site key and secret key. Save the keys, as you’ll need them in the next steps.
Step 2. Configure reCAPTCHA in Contact Form 7
Once you’ve generated your API keys, you’ll be setting up reCAPTCHA for Contact Form 7 on your WordPress dashboard. Here’s how to do it:
- Go to your WordPress admin dashboard and click on Contact > Integration.
- Under Integration, you’ll find reCAPTCHA. Click on “Setup Integration” and you’ll see fields for API keys.
- Enter the site key and secret key that you got from the Google reCAPTCHA admin page.
- Click on “Save Changes”.
Step 3. Add reCAPTCHA to your contact form
Now that you’ve entered your API keys and configured reCAPTCHA, you’ll need to add reCAPTCHA to your Contact Form 7. Here’s how to do it:
- On WordPress, go to Contact > Contact Forms. You’ll see the list of your forms.
- Choose a form where you want to add the reCAPTCHA and slick on “Edit”. The edit button will show up when you hover your cursor over the form. Clicking on edit will navigate you to the form editor.
- In the form editor, add the reCAPTCHA shortcode [recaptcha] where you want the reCAPTCHA box to appear.
- Click on “Save”.
And that’s it! reCAPTCHA v2 will be added to your Contact Form 7 once you complete the above steps. You can now test your forms to know if reCAPTCHA v2 is working properly. There should be an option to check the “I’m not a robot” box before submitting a form. We hope this guide will help you install reCAPTCHA for Contact Form 7 correctly.