bastianallgeier/kirbycms-extensions — pull request #61 by danielweidner (2013-10-08 11:09:32+00:00)
Title: Submission Plugin: Simple Honeypot Spam Detection

Many different techniques for spam protection exist out there (have a look on the great article of David Bushell on Smashing Magazine for an [overview](http://coding.smashingmagazine.com/2011/03/04/in-search-of-the-perfect-captcha/)). The honeypot trick is probably one of the easiest methods to implement. Using this technique a form field is introduced which is hidden from users using CSS. Weak spam bots will probably fill out those fields allowing us to distinguish between input from humans and bots.

This pull request implements a simple option that allows developers to specify the name of such a honeypot field in the options. If a value for the specified field is given, the submission of the form will be canceled and the success callback will be triggered directly. This way the spam bot is given the illussion everything went well. In the success callback the isSpam method can be used to implement different behavior for spam messages and valid requests.

In case of the contactform spam bots will be simply redirected to the url given in the goto parameter without sending the email to the recipient.