Fast, Easy Spam Prevention I don't know about you but one thing that kills me online is the damn captcha login screens, half the time I struggle to read them and with the new house number capture I find it ten harder. At times I'm sure I must be part robot. Unfortunately spam is here to stay and no matter what actions we take to preserve our privacy online the unwanted spam will always find a way through, what we can do is take the extra steps to protect ourselves. Now obviously the captcha login screen is one way but as I mentioned above this drives me insane and if it drives me insane then more than likely it drives you and many more insane too.. You most likely have come across the adding number screen too but personally I find it a little condescending asking me what 2+1 equals, at least give me a challenge and inject a little gamification. But in all seriousness when I am using a contact form to send you a message I simple want to send you a message not play games trying to read house numbers, do mental arithmetic or anything else. Just let me send the message.. Say hello to honeypot… The Honeypot technique is easy and effective, it doesn’t interfere with the user experience. It demands nothing extra of them. In fact, your users won’t even know you’re using it! Sounds almost too good to be true! But this is happening right now, and the process is supper simple too. To implement the Honeypot technique, all that’s required is adding a hidden form field to the form in question. The form field can have any name or id associated to it, but make sure to add a display: none CSS rule on it. See picture for example: Note that the 2 email fields, real_email and test_email. test_email is hidden via display: none, so it’s not visible, nor can it be submitted by real end users. And that’s what gives away whether the form submission is spam or not. Real users won’t be able to see the field, or submit any value for it. Spam bots, however, will still see the field in the form’s markup and submit it with the rest of the form. So from there all that’s needed is to test whether the hidden field was submitted or not. If it was, the submission can be treated as spam. And remember, because the field is hidden and out of view, users don’t even know it’s there. That’s a more user friendly approach to spam prevention vs. having them complete a captcha challenge, or answer silly questions. As mentioned above spam is here to stay but with a simple line of code you can turn pretty much most contact forms spam free.









