Briefly summarize the issues you have been experiencing.
Hello! We have set up a couple of websites running on Netlify and they are all running fine. The problem is with the new website we’re working on, the form won’t work for some reason. We copied the code from the existing websites, so it should work in theory, correct?
After the submission, we get redirected to the
/thanks/ page, but receive a 404 status from the POST request. Inspected request contains values
form-name: contact, email: firstname.lastname@example.org which is the same as on the existing websites.
A couple of differences we have in the implementation is that this website is running on localhost or Netlify as opposed to the existing websites running on Netlify and hosted on a custom domain. The other difference is we use dynamic import to generate the content, i.e. when inspecting source code, the form is not included yet. I read this might be causing issues with Netlify not picking up forms, but then again, we build the existing websites using the same import and they work. Would you be able to give me some pointers what might be going wrong please?
Please provide a link to your live site hosted on Netlify.
What have you tried as far as troubleshooting goes? Do you have an idea what is causing the problem?