Forms Not Working - 404 Error on submit

Like others, I’ve been tirelessly trying to get my form to work and have tried many different ways such and examples you’ve provided.

Please can I have some help with this, I’ve looked endlessly at the guides and cannot see anything wrong with this.

Here’s a link to the site - https://agitated-galileo-6279ac.netlify.app/

Here’s a link to the code - https://github.com/natelloyd1/portfolio-site/blob/master/src/Components/Contact.js

Thank you for your help.
Nate

Hey @nateknown,

Checking against our form debugging guide:

  • Step 1, we’re still able to see data-netlify=true for your built site which means we’ve not processed it.
  • Every input needs a name (yours don’t)
    • Names must be unique

The guide in general will be able to advise on required – and best – practices. Check it out! :smile:

Thank you for your reply @Pieparker

’ Every input needs a name (yours don’t)

  • Names must be unique’

Were you referring to the submit button which was an ‘input’? I’ve changed this to a ‘button’ now but still going to a 404. https://github.com/natelloyd1/portfolio-site/blob/master/src/Components/Contact.js

question - do you have a plaintext html that also has the changes that you made to the JS generated form? We do need a plain html somewhere in your project which we parse at build&deploy time to get your form to work properly.

1 Like

@perry Hi Perry, I’m sorry, I don’t think I understand your question? Here’s a link to the code in my form - https://github.com/natelloyd1/portfolio-site/blob/master/src/Components/Contact.js

hi there, we do need a plain text html for every site that has a form, as that is what the build process reads through when we deploy your site to set things up correctly. if you make changes to the JS, you also have to make them to the plain text.

More info:

Hi @perry.

Thank you, I’ve fixed it now. Yes, I just created a ‘form-name.html’ file and put it into my public folder, C&P’d the form and deployed it. Now working WOOHOO!

Thanks again,
Nate

1 Like