Hi, @tcapozza. When Netlify’s form parser analyses a page with a <form>
tag on it, our service will add a hidden <input>
to the form so that when it is submitted, it includes a “form-name” field which matches the form.
On the site where this is working, you have two forms defined, “Contact” and “contact”. The “form-name” <input>
is “contact” so the lower case form is the one receiving the submissions. You can see this at “Site Name” > Forms in on web UI.
For the non-working site, there is only a single form named “Contact”. Because the POST is sending “contact” it doesn’t match any forms for that site and returns a 404.
I believe if you change this line:
<input type="hidden" name="form-name" value="contact" />
to this:
<input type="hidden" name="form-name" value="Contact" />
that will resolve the issue.
Also, if you just completely delete that line, Netlify will automatically insert the correct <input>
(provided the form is correctly parsed). In other words, it is normally not required (nor recommended) to manually create that <input>
.
If there are other questions about this, please let us know.