On Contact Form 7 4.3 and greater, reCAPTCHA is the standard CAPTCHA solution.
Don’t confuse reCAPTCHA with Really Simple CAPTCHA, which was the default CAPTCHA solution prior to 4.3. Really Simple CAPTCHA is a WordPress plugin I’ve created and maintained for 8 years. reCAPTCHA is Google’s service, and has tremendous advantages over Really Simple CAPTCHA.
To get started with reCAPTCHA, you need a Google account and to register your site for an API key pair.
- Go to Google’s reCAPTCHA admin page.
- Register your site.
- Get a site key and secret key.
Choose the “reCAPTCHA v2” + “Checkbox” type.
Copy the key pair into the WordPress admin screen of the site you registered.
- Go to the admin menu Contact > Integration.
- Find reCAPTCHA panel and click Configure Keys.
- Copy the site key and secret key into the fields and save them.
Lastly, put a placeholder for a reCAPTCHA widget ([recaptcha]
) into your contact form content.
A [recaptcha]
placeholder is a form-tag, and like other form-tags, it supports several options.
Option | Examples | Description |
---|---|---|
theme:(theme) | theme:dark |
The color theme of the widget. Available values are dark and light. The default value is light. |
size:(size) | size:compact |
The size of the widget. Available values are compact and normal. The default value is normal. |
id:(id) | id:foo |
id attribute value of the widget. |
class:(class) | class:bar |
class attribute value of the widget. To set two or more classes, you can use multiple class: option, like [recaptcha class:y2008 class:m01 class:d01] . |
Example:
[recaptcha size:compact]