I’ve looked around the forum, but can’t find any other posts that helped me solve this issue, so here it goes:
I am building an application using Gatsby V2. I’ve followed the docs for setting up a form on my site. The problem is that Netlify doesn’t recognize the form and when I submit I get a 404 error.
UPDATE: Because the form is hidden inside a modal, it was dynamically generated by JS after the page had first loaded. Because of that, Netlify had no knowledge that the form existed. I fixed it by hiding the form through CSS instead of using React/JS state to toggle the modal.
SECOND UPDATE: The real issue was that I needed to encode the body part of my form inside my axios call. The modal part wasn’t really a thing.
I hope that helps someone else in the future!