Submitting Netlify Form gives 404

Hey all. I’m building a few websites using Gridsome and having an issue getting Netlify Forms working. I checked the generated HTML and the form looks like it is properly formatted per the Netlify documentation. Things I have checked/tried;

  • With and without the action attribute
  • With and without the method attribute, tried both get and post (for giggles)
  • With and without a hidden field for form-name
  • Made sure my form has a name attribute
  • Made sure all my fields have name attributes

I’m not sure what I’m missing here. Worth noting that with a get requests on the method attribute, it does not return a 404, but it does not submit my data. The form is recognized by Netlify and is displayed in the dashboard for my app.

Any assistance would be greatly appreciated. Currently running into issues on two of my apps, but this is the most recent one I’ve been dealing with;

https://pensive-goldwasser-94a805.netlify.app/

Thanks!

Hiya @bmorrisondev and welcome to our community! I think based on your report that you’ve read this article:

…but seeing a a 404 for a POST (the only means of form submission we support) means we have not processed your form correctly, so you need to keep working on getting it detected. If you can put the method=POST (or remove method entirely) back in it, it looks like it might be correct, except that your content-type is incorrect and the article will show the correct one.

Thanks for responding! Ok I tweaked my form a bit and made some progress. First thing is corrected the encoding type & remove the method, but that didnt change anything. Then I removed all the extra data attributes except the data-netlify one just to rule out any issues with that, that also provided no change. I then removed a hidden tag with the name of the form that I added manually, now I no longer get 404s, but I also dont get any submissions in the dashboard. I changed the name of the form to try and associate it with a new form in the dashboard as well.

Any other suggestions?

when you are testing form submissions, are you using “Real” data or easily detectable “dummy” data? (test, test@test.com and so on?)

reason i ask as a sanity check - anything spammy lookin’ will get weeded out by our robots.

I forgot to respond to this that I found a solution. Gridsome has a section in their docs on adding a Netlify form and they do so by intercepting the request and manually posting the data using JavaScript. They dont detail why this is the approach to take, but I suspect it has something to do with the way Gridsome handles routing. In any case, this helped me create the form I needed. Thanks for all the help!

1 Like