Old form deleted, new form not detected

I’m working on adding 2 new forms to my Gatsby website, currently in the deploy preview branch. https://deploy-preview-1--condescending-babbage-bd20fa.netlify.app/book-a-consultation, with the form name “project_questions”.

This booking form initially was working, but had some errors, so I managed to delete it to start again, giving it a new name attribute (formerly “consultation” and now the above “project_questions”, and changing the erroneous fields to fix the errors. Now, submissions are not being detected at all, and the new form isn’t being recognized by Netlify. I believe it is formatted the way it needs to be, but no luck so far.

Originally I tried renaming the fields that weren’t working, but that didn’t work at all, which is why I managed to delete it using a curl request as documented in another support thread (I can’t find the link anymore).

Hi, @mlaroy. Thanks for asking this questions about forms on Netlify.

This Support Guide is the first port of call to debug any forms issues. There are also many other Support Guides for forms - you can find them here: #Netlify-support:support-guides

We also recommend trying to search the forums or look at topics tagged Netlify forms if you haven’t already - it’s likely your question was already asked by someone else!

Note, I checked the URL above and there is no form in the HTML. I do see this:

          <section class="container relative md:mx-auto px-4 py-16 w-full md:py-24 "><noscript>This form requires JavaScript, sorry!</noscript></section>

It looks like you are missing the HTML only form which is a requirement. Is the HTML form in another file? If so, where do I find the HTML only form?

If you are still having problems, please provide more information such as what you have already tried, and a link to your HTML only form. :slight_smile:

thanks @luke - that support guide is what led me here to post a new topic. I searched the forums and tried a number of fixes, but nothing has worked for me thus far. Interesting that no form appears for you :thinking:. There is no other page that hosts this form. I’ve had success in the past using this technique on Gatsby sites.

I’ll also point out that the form on this page does indeed work, and is created using the same technique, as I was following the docs here - perhaps I am missing a hidden field?

ok - for those coming to this thread, it seems I disabled no-JS support for the form after it was picked up by Netlify. My assumption was that Gatsby’s build process generated a static html form, which it did originally, but in reality this was not the case with my implementation, which would hide the form without JS enabled. The original form continued to work even though the html form didn’t exist any more. Once I reverted this change, the new form was picked up, and I could then safely make is JS only.

1 Like

Hi, @mlaroy. Thank you for taking the time to provide such a detailed description of both the root cause and the solution.

Not only did you solve it yourself, you took the time to share what you discovered with the rest of the forum and that is awesome in my opinion! Thanks again for taking time to follow-up. :+1:

EDIT: I wanted to follow-up with a reminder. If you add new fields to the form in the future, please toggle the javascript only setting again. Doing this will regenerate the form again with the additional fields.

Our build system processes the HTML form fields and only allows fields in the form to be submitted. If you “rinse and repeat” by toggling the javascript only setting again, it will regenerate the form once with the new fields which “checks the box” to get the new fields detected by the form handler.

1 Like

thanks for the tips @luke!