It seems something has changed recently with the way newly created sites deal with Netlify forms.
I’m creating sites through the API, and I noticed ‘Form detection’ is disabled by default. I need to manually go to the UI to enable it, redeploy, and only then it detects my forms.
How can I change this? Is there a property in the Netlify API I can send to enable forms whenever I create/update a site?
@nvdb31, welcome and thanks for the post.
Based on the API documentation links below you cannot enable form detection via the API. You have to manually go to the UI to enable it.
Deploy modern static websites with Netlify. Get CDN, Continuous deployment, 1-click HTTPS, and all the services you need. Get started for free.
That’s not true,
@clarnx. Almost everything done by UI is basically something that can be handled by API. The relevant payload would be:
updateSite should work:
Netlify API documentation
Thank you so much
@hrishikesh! That seemed to work.
@hrishikesh, thanks for the correction.
However I honestly feel the Netlify Open API documentation needs an update as it’s very difficult to find information.
Most of the parameters are not explained and you can’t tell what it does.
Even the option
"ignore_html_forms": false you provided is not available in the documentation. Correct me if I am wrong as I have searched the whole documentation.
I have raised it internally once or twice regarding the Open API spec being incomplete, but as far as I know there’s just not enough motivation and bandwidth to keep it up-to-date. I could be wrong though. This is why our most relevant guideline says, reverse-engineer the API endpoint by checking our UI:
[Support Guide] Understanding and using Netlify’s API - Support / Support Guides - Netlify Support Forums