How can I prevent the IE form from automatically populating with the honeypot field?

I used honeypot fields in most of my customer contact forms to prevent spam. However, I notice that the IE form autocomplete option fills the honeypot field and thus triggers my anti-spam logic. How can I prevent this?

I tried to give the form field a different name - it is currently called emailConfirmation , but I tried conf_em and liame and it is still autocomplete. I also tried moving the honeypot field to the very bottom of the form — nowhere near the existing email input.

+6
source share
3 answers

As suggested in David Faber's answer, 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 .

+5
source

Give your honeypot field a semi-random name, for example. The suffix of the actual name with a random number. Thus, it should never be the same name twice and should not be populated by IE.

You can also take a look at cfformprotect . He got some great features and helped me protect the forms by introducing several projects.

+1
source

here is my suggestion for your invisible honeypot: Put the autocomplete = "off" html tag at the form level. Putting it on an invisible field level, you identify your hidden filed and slightly intelligent bot, which can use this to recognize it. tag autocomplete add-in: http://help.dottoro.com/lhdwgiwh.php You must pass a technical test with target versions of IE (do you need support for IE 5 and 6?). Use the widest possible name for your invisible field name. For instance. countries, so the bot algorithm will pick it up and fill it with data.

Regards, Carlo.

0
source

Source: https://habr.com/ru/post/909633/


All Articles