Contact Form 7 & spam filtering

A lot of our clients use Contact Form 7 for their contact forms. With a couple of additional plugins you can mitigate most spam and bot submissions.

First, you probably already have Akismet, you definitely do if you’re a WP Support HQ customer. If not, it’s worth getting and might be free depending on your use.

This is great because it’s already supported by Contact Form 7.

To use it you need to add the follow special tags to the From Name and From Email fields in your form.

[text* your-name akismet:author]
[email* your-email akismet:author_email]

Next we add something called a honeypot. This is a special field that normal users don’t see, but bots and other automated scripts will. If it’s filled out, then Contact Form 7 knows it was a bot or spam. I like this because it’s a user friendly way of filtering. Invisible to users actually.

Install the Honeypot Module for Contact Form 7. After you activate it, on your form edit page, add the honeypot field. It will look something like this:

[honeypot honeypot-37]

You’ll want to change the default naming to something that looks like an actual field that should be filled out. I often use “interests” or “categories”.

[honeypot interests]
After the changes for Akismet & Honeypot

That should take care of most spam and leave a good user experience. If you need or what to be more restrictive you can checkout setting up a ReCAPTCHA.

Leave a Reply

Your email address will not be published. Required fields are marked *