Wordpress

How to Add Captcha in Contact Form 7 in WordPress

In this article, you’ll learn how to add captcha in contact form 7 in WordPress. Captcha is a security feature on an online form that prevents the auto bots to submit it automatically and sending the spam emails.

So, it is a good idea to add a captcha on your website’s online form. Here are step by step instructions to get reCaptcha API key and to add it to contact form 7.

Steps to get reCaptcha API Key:

  1. Login to your Google account and go to Google reCaptcha Admin Console.
  2. Click on the “Create” icon.
  3. Enter your website name in “Label” field
  4. Select reCAPTCHA type -> reCAPTCHA v3
  5. Enter your website domain name in the Domains field
  6. Accept the reCAPTCHA Terms of Service
  7. Get “Site Key” and “Secret Key” from the reCAPTCHA Keys section.

Google reCaptcha Settings:

google recaptcha settings

Get reCaptcha “Site Key” and the “Secret Key”:

recaptcha site key

Steps to add Captcha in Contact Form 7:

  1. Go to Contact -> Integration section
  2. Click on Setup Integration
  3. Enter the Site Key and Secret Key in the given fields and save it
  4. Go to Contact -> Contact Forms and open your contact form
  5. Add the reCaptcha shortcode [recaptcha] to your form
  6. Save the changes and refresh your contact form page to see the changes.

Contact Form 7 reCaptcha Integration:

setup integration

contact form 7 recaptcha integration

Edit Contact Form:

edit contact form 7

Insert reCaptcha shortcode on Form:

recaptcha shortcode on contact form 7

If you are using contact form 7’s version 5.1 or higher then you have to use the reCaptcha v3. The reCaptcha v3 is an invisible captcha and you can not see it on your form. But you can see a sliding badge in the bottom right corner of your website page having text “Protected by reCaptcha”.

protected by recaptcha

As this type of captcha is invisible, so it will automatically validate your form. You don’t need to enter the captcha code or tick to validate it.

General FAQ

How do I insert reCaptcha shortcode in Contact Form 7?

Click on Edit form and under Form tab insert [recaptcha] shortcode where you want to display the reCaptcha box.

How Do I get Site Key for reCAPTCHA?

Login to Google reCAPTCHA Admin console. Register your website for reCAPTCHA. Then go to reCAPTCHA Keys and Copy Site Key.

How to get reCAPTCHA Secret Key?

Login to Google reCAPTCHA Admin console. Register your website for reCAPTCHA. Then go to reCAPTCHA Keys and Copy Secret Key.

About the author

admin

Leave a Comment