I tried out Netlify forms but every time when I submit the form via JavaScript I get a HTTP 303 response and the form is not submitted. I checked everything but I don’t see anything that could be wrong. Also I don’t have any captchas or honeypot fields so it is a simple and pure HTML form.
The website can be found here: https://upbeat-ardinghelli-2021.netlify.app (the contact form is directly on the start page on the bottom right corner behind the “Contact us” button)
The test source code for handling the form submission looks like this
I have another site where everything works as expected with almost the same setup and technologies (Gatsby and React). The initiator there starts also with webpack:// so I guess this should not be a problem.
thank you for trying to help me. The whole repository does not have any reCAPTCHA or honeypots included right now. I also searched through the repository to find something hidden or forgotten but nothing is in there:
Note to myself and other future readers: I found the solution Netlify forms is just able to parse and find a <form /> with the attribute data-netlify="true" when it is already rendered on the page. It can also be hidden via CSS display: none; but it needs to be in the DOM. Otherwise the Netlify bot can’t find it.
The problem in my case was that the form is conditionally rendered which means the DOM nodes are dynamically created on that time when a user interacts with the page like clicking on a button.
A good indicator for this was to delete the (old and outdated) existing form in the Netlify dashboard and re-deploy the site. In my case a new form was not created which leads to my moment.
Thanks so much for circling back and sharing this update, it will definitely be helpful to future Forums members who encounter something similar. I am glad everything is working for you now!