Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

How to add additional spam injection prevention to my forms? I think CAPTCHA protection is insufficient.

Author: Edward Hardin Reference Number: AA-00298 Views: 9152 Last Updated: 10/27/2016 02:11 PM 0 Rating/ Voters

You can add additional spam injection protection to your forms by using a field that must be left empty for a successful submission. The nature of spam bots force them to fill out each form field. This is where we can outsmart them.

Just add a field to your form with the display:none CSS style:

<input type="text" value="" name="field1" style="display: none;" />

And add following line to your form configuration in config.php file:

required_empty_fields = field1 (Leave Empty)

Users won't see this field and would never fill it. Even if user fills it under some weird circumstances, they would see an error message and will resubmit correctly. However bots can't read and understand this text and will stuck here.

Required Empty Field

Note
This solution works great along with the captcha feature. We do not recommend to rely on the required empty field as the only solution.