Before using CAPTCHA
- You need GD library installed on your server.
- Make sure
contact-form-7/captcha/tmpwp-contents/uploads/wpcf7_captcha folder is writable. (*1)
- CAPTCHA does not give you 100% security.
*1 — Contact Form 7 1.8 and later use wp-contents/uploads/wpcf7_captcha as image folder.
How to use CAPTCHA
To add a CAPTCHA into your contact form, use
[captchar] tags in the form content field in Contact Form 7′s admin page.
[captchac] means CAPTCHA-Challenge and it is replaced by an
<img> element for CAPTCHA’s image.
[captchar] means CAPTCHA-Response and it is replaced by an
<input> element for an input field.
[captchac] must be paired with a
[captchar] with the same name. For example, tags shown below are valid.
[captchac captcha-1] [captchar captcha-1]
And your browser renders them as shown below.
I show you another as a bad example.
[captchac captcha-2] [captchar captcha-3]
They are invalid as having different names. In this case, your browser renders them as above, but the CAPTCHA never matches.
To change the foreground color of a CAPTCHA, use
fg option with
[captchac]. Put RGB color code in hex format after
fg:#. For example, set
fg:#ff0000 if you want red foreground.
In the same way, use
bg option to change the background color.
To change the size of a CAPTCHA, use
size option with
size:m (72×24) and
size:l (84×28) are available. If you don’t set
size:m is used as default.
I show you some examples.
[captchac captcha-1 size:s fg:#ffffff bg:#000000]
[captchac captcha-1 size:l fg:#33ff99 bg:#223399]
To change the size of an input field, use
size/maxlength option with
For example, if you want an input field with 40 as size and 100 as max length, add a tag shown below.
[captchar captcha-1 40/100]
And all available options for
[text] are also available for
Russian and Brazilian Portuguese translations
Now Contact Form 7 has translations in the following languages.
- Brazilian Portuguese
If you have a translation in a language not listed above, please let me know.
New usage of Akismet
Since I released Contact Form 7 1.4, I have got a ton of messages from users saying that Contact Form 7 stop sending mails after they turned on Akismet option on it. In most cases, the problem was that they have not added necessary options (
akismet:author_url) for using Akismet properly.
I considered the fact that so many users got confused, and decided to change the usage.
Contact Form 7 1.5 always sends information to Akismet server if:
- You have activated Akismet plugin, and
- You have added at least one of options for Akismet (
I removed Apply Akismet checkbox from admin page as it is not necessary anymore.
For beginners, I show you how to use Akismet on Contact Form 7.
Step 1. You need Akismet plugin. If you have not activated it yet, activate it first.
Step 2. Open Contact Form 7′s admin page and edit form content field as:
akismet:authoroption to the tag of field which requires sender’s name.
[text* your-name akismet:author]
akismet:author_emailoption to the tag of field which requires sender’s email address.
[email* your-email akismet:author_email]
akismet:author_urloption to the tag of field which requires sender’s URL.
[text your-url akismet:author_url]
Sender’s all input and many other information related to the inputting activity are sent to Akismet server. Then Akismet judges whether it is likely to be a spam.
See also: How to use Akismet on Contact Form 7 (Contact Form 7 1.4 release announcement; available except outdated Step 1-3)