Prevent spam via contact form

Increasingly, spambots are taking any form they can get, so it's not surprise there's more and more of this useless shite coming through the contact form...

Now, there's an easy way to prevent this, I just committed a new patforms element called Bottest. It works with the old, but still effective technique of having a via-css-hidden formfield. If it's filled out, it's most certainly a bot :)

How to add it to your form:

- Upgrade the CMS to the trunk or the 1_4 branch. Or just put this file inc/patForms/Element/Bottest.php into the right folder.
- Then add the following line to your contact form table in /contact/index.en.xhtml

<tr class="formurl"><td forms:fieldErrorID="email" nowrap="nowrap"><i18n:text>Bot-Test (leave blank)</i18n:text>:</td><td class="formgenerell"><patForms:Bottest label="i18n(E-mail)" name="homepage" required="no" description="" /></td></tr>

And make sure the the css-class "formurl" has a display: none in your CSS.

Hope that helps..

Comments (3)  Permalink

Comments

marco lobato @ 29.06.2006 01:44 CET
hey! i guess u can help me in this one, yes im a newbie and i would like to restores my contact form to teh original i had already copied all te code again but doesent works how can i do that , hope u can help me on this one.
chregu @ 29.06.2006 06:40 CET
I posted the answer to the forum:

http://forum.freeflux.net/index.php?t=msg&goto=928&rid=2#msg_928
Thijs @ 03.09.2006 12:37 CET
i like the idea, i think it should work on my site too.
Thanks!
No new comments allowed (anymore) on this post.