The Honeypot field is present and also recognized, I’m getting the"Extra spam prevention enabled via honeypot field." Message in the Form-Submission Overview.
But if I’m testing the Bot-Field and put in some value in the field the Form shouldn’t be submitted, right? Or at least shouldn’t appear in the Form submissions. Unfortunately it does, even in the “Verfied” Section…
Steps to reproduce:
Browse URL
Toggle Form
Mage Botfield visible by removing class hidden in the dev tools
Enter value in botfield
Submit Form
Check Form Submissions => Submission appears
I really want to use the honeypot protection as we are no fan of the recaptchas. So I’d appreciate some feedback or solution on this
Looking at the page, the placeholder (or hidden) form does not contain the netlify-botfield attribute, on the rendered form. Also, the rendered form contains inputs (e.g. email) that the hidden placeholder form does not. As stated in the Work with JavaScript-rendered forms documentation
…and input fields with name attributes to match the inputs of your JavaScript-rendered form.
The form submissions also include the email-Addresses correctly.
As stated in the docks, the netlify-honeypot is stripped out by the bots, automatically, when detected.
So it’s in my opinion the correct handling (because the honeypot field IS in the form initially).
It was a stateful component. And as always the problem sat in front of the monitor:
The moment i added my onchange function to add the bot-field to the payload for the ajax-submission everything worked fine.
Hope it helps other people who forgot to add the custom logic.