1. Spam bots indiscriminately fill out every field in a form and send it off.
2. If a field is not visible to a human, he or she would most likely not enter data into it.
3. I added a CSS rule into our external .css file called hiddenrow.
4. I applied this rule to the row of the table that holds the field in question.
(I also included a simple "do not enter data in this field" comment next to the field, in case someone is using an old browser or for whatever reason the CSS rule is not working.)
5. It should be a simple matter to include a test at the beginning of the send_mail subroutine that checks for contents in the hidden field. If it finds content, the subroutine aborts; if it does not find content, it continues.
I suspect that this would eliminate 95% of the form spam we now receive. The only problem is that I don't know how to code it! I tried the following:
Expand|Select|Wrap|Line Numbers
- sub send_email {
- if ($Form{'hiddenfield'} eq '') {
- [continue with send_email subroutine]
- }
- }
Many thanks.
Rick A.