405 Method not allowed on Netlify form

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.

The better the post - the faster the answer.

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:

$ curl --compressed -svo /dev/null https://www.vibe-nation.com/  2>&1 | egrep '^< '
< HTTP/2 200
< age: 77521
< cache-control: public, max-age=0, must-revalidate
< content-encoding: gzip
< content-type: text/html; charset=utf-8
< date: Sun, 04 Dec 2022 10:29:24 GMT
< etag: "2f2ff-eMzSyof1nfwc5bR4tkV28KpCmL0-df"
< server: Netlify
< strict-transport-security: max-age=31536000
< vary: Accept-Encoding
< x-nextjs-cache: REVALIDATED
< x-nf-render-mode: odb ttl=60
< x-nf-request-id: 01GKGMVNADV2XJCE1MCCJ7KBTF
< x-powered-by: Next.js

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.

Thanks Luke, will give that a go. Strange that this used to work and was still an ISR but added an input and it stopped

Hi @snips11 :wave:t6:, welcome back to the forums! :netliconfetti: Give a go and let us know how you get on? We appreciate the feedback and stopping by. Happy building and good luck. :smiling_face_with_three_hearts: