Home
Support Forums

Simple HTML form returns 404 on submit

I’m super new to gatsby & netlify and just published my first site here.

  1. I’m using a very simple html form.

< form name=“aquaProContact” method=“POST” netlify >

  1. The name in the dashboard is coming up as “contact”, not sure if that matters. That was the original name of the form before I renamed it.

  2. All fields have a name=""

  3. Live form for can be seen here: http://aquaprospa.com/contact-us

  4. console error on submit: POST http://aquaprospa.com/contact-us 404 (Not Found)

Most of the posts here pertain to js generated forms and this is just a plain 'ol html form.

Any help is much appreciated!!!

~Mike

Hey @twinleafdev,
Sorry for the long delay here! I took a look and it seems like you’ve moved away from Netlify since writing in. If you want to give it another shot, let us know and we’d be happy investigate.

Hi @jen,
Thanks so much for the reply!!

I’m still here. If someone could take a peek at the issue it would be much appreciated.

Definitely! Heading out for the evening here shortly, but will dig in tomorrow. To start, that site at the link you shared originally looks like it’s served by Cloudflare and the form is missing the netlify or data-netlify="true" attribute. Maybe there’s another version? Could you please share the Netlify URL where you’re working on the version for Netlify?

In the meantime, in case it’s helpful, here’s a support guide with code for a Gatsby form:

Here’s the netlify url:

The form tag starts with:
< form name=“aquaProContact” method=“POST” netlify >

Thanks again!!

Hey @twinleafdev,
Can you please try uncommenting this line:

Looks like we’re missing that in the POST request, so the submission isn’t getting to the form in our backend.

If that doesn’t work, Plan B is to help you incorporate the code in the support guide I linked :slight_smile: But let’s try the simple uncommenting first!

I just did a deploy and still not getting a submissions. Also I still see a 404 in the console on submit.

Last thing: can you please add the data-netlify="true" attribute in the form tags where you currently have just netlify?

I forked your repo, added the hidden element, and changed that attribute, and am seeing submissions to the form in my dashboard: https://github.com/kaganjd/AquaPro-bluma/commit/9a72e113e39aa3f2f1dffbd1b876802e939c552e

Aside from that, I’m seeing that you have a page called “thank-you” so I’m assuming that you may want to show that after a form submission? Note that you will need to write some code to achieve that- explained in the support guide I linked above. But if you don’t, then you should now be good to go :rocket: Please let us know if that’s not the case.

I’ll be damned!! That worked! I could swear I tried that but who knows.

Changing the form attribute from netlify to data-netlify="true" did the trick.

Thank you so much!! I really appreciate your efforts! :smiley:

~Mike

1 Like