I am currently using Next.js v14 and have followed the documentation for “Next.js 13.5+ on Netlify” to build a form on my site. However, when attempting to submit the form, I encounter a 404 Not Found error for the __forms.html file, which causes the submission to fail.
To troubleshoot, I also cloned the repository from Next.js Platform Starter and deployed it to Netlify without making any modifications. Unfortunately, the same error occurs upon form submission.
Here are the details of the issue:
Next.js version: v14
Repository used: Next.js Platform Starter
Documentation followed: Next.js 13.5+ on Netlify
Error: 404 Not Found for __forms.html upon form submission
I have double-checked the documentation and my deployment setup, but the issue persists. Could you please provide guidance on how to resolve this issue, or let me know if there are additional steps needed for setting up form submissions with Next.js on Netlify?
Thank you for the suggestion!
I enabled Form Detection on both sites and redeployed them. After doing so, the form submission worked successfully.
Thanks again for your help!