If you want to add a CAPTCHA to your Contact form 7, you can select Google reCAPTCHA or any other CAPTCHA service. Following this, we guide you how to add Google reCAPTCHA to Contact form 7.

By following the below steps, you can add Google reCAPTCHA to your website.

Step-by-Step Guide:

1. Get Google reCAPTCHA API Keys:

  • Go to the Google reCAPTCHA website.
  • Sign in with your Google account and register your site.
  • Depending on your needs, select the reCAPTCHA v2 or reCAPTCHA v3 options.
  • Once you have registered, the next step is to note down the two keys; Site Key and Secret Key.

2. Install and Activate the Contact form 7 Plugin (if not already installed):

  • To use google reCAPTCHA in your WordPress website, you must have contact form 7. If not installed, install and activate contact form.

3. Configure reCAPTCHA in Contact Form 7:

  • Go to your WordPress dashboard.
  • Navigate to Contact → Integration.
  • Find “reCAPTCHA” and click Setup Integration.
  • Enter your Site Key and Secret Key from Google reCAPTCHA website.
  • Save the settings.

4. Add CAPTCHA to the Form: 

For reCAPTCHA v3:

  • No additional form tags are needed; it’s automatically added to all forms.
  • You’ll see a reCAPTCHA badge on your site. If you want to hide it, add the following CSS (Google requires acknowledgment in your terms of service):
.grecaptcha-badge { display: none; }

For reCAPTCHA v2 Checkbox:

  • Open the Contact Form 7 editor for the form you want to secure.
  • Add this tag where you want the CAPTCHA to appear:
[recaptcha]

5. Test the Form

  • Go to the page where your contact form is displayed.
  • Ensure the CAPTCHA is visible and functional.
  • Submit the form to confirm that it works properly.
Share.
Leave A Reply

Exit mobile version