Hi, I am having issues getting this gatsby form to work.
The Form lives on a gatsby portal (another div) and it seems that netlify can not find it? the form doesnt not work at all. The worst part is that i am not getting any issues telling me the issues.
@Madgeniusblink, I think found the root cause. There is no HTML version of the form in the deployed files.
It appears the HTML form is created at browse time by the site javascript. However, for Netlify to create the backend to accept form submissions a pure HTML version of the form must exist in the deployed HTML files. There is more information about this in our documentation here, quoted below:
Work with JavaScript-rendered forms
Our bots find your forms by parsing the HTML of your site when the build completes. This means that if you’re using JavaScript to render a form client-side, our bots won’t find it in the pre-built files. You can work around this by creating a hidden HTML form with the data-netlify="true" attribute and input fields with name attributes to match the inputs of your JavaScript-rendered form. You need to apply the same work around if you want to use our reCAPTCHA 2 integration, and create a div element in the hidden HTML with the data-netlify-recaptcha="true" attribute.
While the two articles are fairly framework-specific, the code demonstrates how to prerender forms when working with them in a web application.
To summarize, please make certain that an HTML version of the form is present in the deployed files as this is required for the post processing at Netlify to create the endpoint for accepting the form submissions.
If there are other questions about this, please let us know.
Hey luke, I am having issues submitting the form via Javascript.
take a look at what I have… I am following the same example thats on the netlify reactjs blog post…
any idea what would be going wrong? the error I get is a POST 404:
you are posting to a PATH that doesn’t match the action= defined in your html form, or,
we didn’t process your form and you’d need to start by solving those, following the workflow here:
That’s where you must start; we can’t start there for you, since we can’t become familiar with your source code. Once you have the form recognized (you’ll see it in the dashboard) and accepting submissions (you’re posting to the right path with the right form-name attribute), then we’ll be happy to help with debugging after that!