I am just trying to load a Netlify form, all we have done is change to name of the form and added two selects however the for doesnt now register in Netlify and redirect loads a 405 not allowed.
I cant see what would have changed. The form is at the bottom and in the become a member section.
Hi, @snips11. I took a look at the URL you shared and that page is rendered by Next.js incremental static regeneration (ISR) function. I can tell by the response headers:
Is it this line which let’s me know this is an ISR function:
< x-nf-render-mode: odb ttl=60
The way that the functions handler is created is by parsing the HTML in the post-processing on the build. As this page is handled by a function, there is no HTML file to process. The solution for this is to manually create an HTML file which contains that form and then include that HTML file in the deployed site.
As long as the form the function makes exactly matches the HTML form, the form in the function will work.
Also, if you make changes to the form the function creates, please remember to also update the HTML-only version of that form at the same time.
If there are other questions about this, please let us know.
Hi @snips11, welcome back to the forums! Give a go and let us know how you get on? We appreciate the feedback and stopping by. Happy building and good luck.
It detects the form in the Forms section of the dashboard, but I still get Method Not Allowed upon submit (and no submission to the form in the dashboard).
@Michael_Mannucci It may make no difference in your situation, but you could try making the POST request to the page of the static form, so /netlify-form
I can confirm that works… but correct me if I am wrong, this means I cannot have a custom thank you page? I tried making a thank-you.html page and posting to that, and the form worked, but it still loaded the default Netlify thank you page.
And more importantly, some pages still submit the form and go to /thank-you.html, but this is what is displayed:
You can, but then you need to make sure the thank you page is a statically generated page. It must exist as a static file in your site’s output folder. If not, it won’t work.
Checking the cURL that I ran, (which was extracted from the browser submission for /netlify-form.html), indicates that the form was previously missing the form-name.
You had a static form file at https://www.vibe-nation.com/netlify-form.html which seems to no longer exist. It turns out that when I tested that form it didn’t have a form-name (but later when @hrishikesh tested it, it did) - obviously you had changed it in between.
The form name is required.
Yes, Netlify will not detect dynamic forms, nor can you submit forms with form names that it has not detected.