Step 1
Add a Text element to your form using the following properties.
Step 2
Under the Advanced tab ckeck the Turn off option.
Save the element properties and then save your form.
Step 3
With the form name selected in the left panel click the Advanced tab and then the More options link. This will open a modal window. Click Submit Pieces and in the Begin Submit textbox add a custom snippet.
$this->execPieceByName('ff_InitLib');
if(ff_getSubmit('human') != "") {
die();
}
Save and you're done.
How does a Honeypot work?
It's very simple. Spambots see inputs on a form, fill them with their garbage and submit the form. By adding an input to a form and hiding it in the browser humans will never see it or fill it in. So we simply check if the input contains anything. If so, we quietly kill the process and say Adios, Spammer scum.
Give it a go and let us know in the comments how well it worked for you.
About John Pitchers
John Pitchers is a specialist in back-end Joomla development and development of Joomla based websites. He is also the developer of the FocalPoint maps extension for Joomla. John has been building CMS based web sites since 2004, originally working with Mambo before it became Joomla. When not writing PHP, Javascript or CSS you'll find John carving up the hills around Baldivis on his longboard (long before Walter Mitty made it famous).
Find out more about John on his About.me page and Google+. Follow John on Twitter.