{"authorId":1,"title":{"title":{}},"slug":"hon-ee-pot-captcha-expressionengine","postDate":1293607811,"expiryDate":null,"enabled":1,"fields":{"2":"<p>I have a confession to make: <em>I hate captcha<\/em>. 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 <a href=\"http:\/\/haacked.com\/archive\/2007\/09\/11\/honeypot-captcha.aspx\">Honeypot Captcha<\/a>.<\/p>\n\n<p>I couldn&rsquo;t find any ExpressionEngine addons that added honeypot captcha functionality for both the comment form and the <a href=\"http:\/\/www.solspace.com\/software\/detail\/freeform\/\">Freeform<\/a> module, so I decided to go ahead and create one.<\/p>\n\n<h2>Basic Functionality<\/h2>\n<p>This extension validates the EE comment form and Freeform forms to make sure a field that is hidden with CSS is left empty.<\/p>\n\n<h2>Getting Started<\/h2>\n<ul>\n  <li><a href=\"https:\/\/github.com\/davist11\/Hon-ee-Pot-Captcha\">Download Hon-ee Pot Captcha<\/a><\/li>\n  <li>Unzip the folder and copy the <em>honeepot<\/em> folder into your \/system\/expressionengine\/third_party\/ directory.<\/li>\n  <li>Go to Add-ons &rarr; Extensions and &ldquo;Enable extension&rdquo;.<\/li>\n  <li>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.<\/li>\n<\/ul>\n\n<h3>Setup<\/h3>\n<p>In the Freeform module, go to Fields &rarr; 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 <em>honeepot<\/em>.<\/p>\n\n<p>Now in your form, add the honey pot field:<\/p>\n\n<pre>&lt;li class=\"screen-reader\">\n  &lt;label for=\"honeepot\">Don't put anything here&lt;\/label>\n  &lt;input type=\"text\" name=\"honeepot\" id=\"honeepot\" \/>\n&lt;\/li><\/pre>\n\n<p>In my CSS, I have a class to move things off of the page:<\/p>\n<pre>.screen-reader {\n  display: block !important;\n  left: -9999px !important;\n  position: absolute !important;\n  top: -9999px !important;\n}<\/pre>\n\n<p>You can add the same form field to your comment forms as well.<\/p>\n\n<h2>That is all<\/h2>\n<p>Hopefully this addition will help to combat some of the spam contact form submissions and comments (even though they get caught by <a href=\"http:\/\/loweblog.com\/software\/low-nospam\/\">Low NoSpam<\/a>). You can <a href=\"https:\/\/github.com\/davist11\/Hon-ee-Pot-Captcha\">download the Hon-ee Pot Captcha extension on Github<\/a>. Let me know if you run into any issues.<\/p>","4":{"website":{}}}}