I have implemented honeypot fields on the majority of my client's contact forms in order to prevent spamming. However, I'm noticing that IE's form auto-fill option fills in the honeypot field, and thus triggers my anti-spam logic. How can I prevent this?
I've tried giving the form field a different name - it is currently called emailConfirmation
, but I've tried conf_em
and liame
, and it's still auto-filling. I've also tried moving the honeypot field to the very bottom of the form - nowhere near the existing email
input.
Honeypot form protection means that an invisible field is added to a form. If this invisible field is filled out (bots will usually put in a value), then the form will return an error. Normal users (read: human beings) won't ever see the field, so they won't fill it out.
A honeypot is a field added to the form that the users can't see due to CSS or JavaScript (which hides the field).
As suggested in the answer David Faber linked to, try adding the autocomplete="off"
attribute to the input
tag.
This is not a standard HTML4 / XHTML attribute, but all major browsers understand it. And it is standardized in HTML5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With