Netlify Forms Issue with Next.JS

My app: gregarious-babka-d4c8fa.netlify.app
My git: GitHub - SoyMilkIsOk/terpmetrix-home-page

I can’t get my forms to connect/be automatically detected on my Netlify app. I was able to before I updated to Next 14+. Not sure what could be causing the issue since the code I have seems to match directly to the code that previously worked. See Hero.js or giveaway/maikoh-1.js for examples that don’t work.

Thanks in advance for the help!

@SoyMilkIsOk You may already be aware but the form debugging support guide is here:

Just went through and tried every solution in that post and there is nothing that works. Not sure why updating Next.Js 13->14 would have this effect. Here is my code before (worked before updating). See my git for current code.


This is my current non-working code.


And here is my forms.html file in the public folder.

Edit: Adding this file did get my form recognized in the UI but the submissions are not being submitted.

@SoyMilkIsOk Adjusting your forms.html so it:

  • is visible (so I can use it)
  • has a submit button (so I can use it)
  • posts to known static file route /forms (so Netlify receieve it)

I get:

image

Which is the default Netlify success page, and I’m sure you’ll find my submission in your dashboard.

The crux of it is that you must post to a route which is a static file.

You can obviously still end up on your /success route, but you would probably want to do that by submitting your form with ajax to the static route, then redirecting upon success to your actual success route.

1 Like

For anyone encountering this thread that doesn’t understand from the explanation given above, Netlify have released some additional resources which demonstrate:

1 Like