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:
- Login to your Google account and go to Google reCaptcha Admin Console.
- Click on the “Create” icon.
- Enter your website name in “Label” field
- Select reCAPTCHA type -> reCAPTCHA v3
- Enter your website domain name in the Domains field
- Accept the reCAPTCHA Terms of Service
- Get “Site Key” and “Secret Key” from the reCAPTCHA Keys section.
Google reCaptcha Settings:
Get reCaptcha “Site Key” and the “Secret Key”:
Steps to add Captcha in Contact Form 7:
- Go to Contact -> Integration section
- Click on Setup Integration
- Enter the Site Key and Secret Key in the given fields and save it
- Go to Contact -> Contact Forms and open your contact form
- Add the reCaptcha shortcode [recaptcha] to your form
- Save the changes and refresh your contact form page to see the changes.
Contact Form 7 reCaptcha Integration:
Edit Contact Form:
Insert reCaptcha shortcode on Form:
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”.
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.
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.
Leave a Comment