Problem with honeypot fields
-
Hi Guido,
I have been receiving problem reports from users that the submit button doesn’t work. Normally I can’t reproduce these, but I have now got it to happen on Edge. It seems that if you use the browser autofill then it can populate the hidden honeypot fields too, which causes the form submission to fail silently. I turned debug on and got ‘Error: hidden field’ and then looked at what was in the POST data. Turning off the CSS hiding also shows this happening in the form itself. In my case, Edge populated the hidden vscf_last_name field with the same value as in the name field. I don’t know why this happens because the random element should break the matching algorithm, but maybe Edge uses some fuzzy logic to do the matching.
To test further I cleared Edge’s autocomplete cache and tried again. The first time I submitted the form it worked OK, the second time it used the value for the name field to autofill the last_name field and I got the error again.
Setting the autocomplete=off attribute on the <form> element should disable all autocomplete – not generally needed for a contact form. I don’t know whether Edge will respect it and I haven’t had time to try it.
Looking at Ninja Forms, they do have a honeypot, but its name is just nf-field-hp, so it won’t trigger the name autofill. The only other solution I can see is to add an option to disable the honeypot :-/
- The topic ‘Problem with honeypot fields’ is closed to new replies.