I have a confession to make: I hate captcha. But on the other hand, spam is one of the most frustrating issues ever. So with that being said, I am a big fan of Honeypot Captcha.

I couldn’t find any ExpressionEngine addons that added honeypot captcha functionality for both the comment form and the Freeform module, so I decided to go ahead and create one.

Basic Functionality

This extension validates the EE comment form and Freeform forms to make sure a field that is hidden with CSS is left empty.

Getting Started

  • Download Hon-ee Pot Captcha
  • Unzip the folder and copy the honeepot folder into your /system/expressionengine/third_party/ directory.
  • Go to Add-ons → Extensions and “Enable extension”.
  • You can customize the field name for the honey pot field and the message a user receives if the field is filled in by going to the extension settings.

Setup

In the Freeform module, go to Fields → Create a New Field. Now create a field with the field name matching the field name in the Hon-ee Pot Captcha settings. The default is honeepot.

Now in your form, add the honey pot field:

<li class="screen-reader">
  <label for="honeepot">Don't put anything here</label>
  <input type="text" name="honeepot" id="honeepot" />
</li>

In my CSS, I have a class to move things off of the page:

.screen-reader {
  display: block !important;
  left: -9999px !important;
  position: absolute !important;
  top: -9999px !important;
}

You can add the same form field to your comment forms as well.

That is all

Hopefully this addition will help to combat some of the spam contact form submissions and comments (even though they get caught by Low NoSpam). You can download the Hon-ee Pot Captcha extension on Github. Let me know if you run into any issues.