I’m not getting any verified or spam form submissions under the Netlify UI for my project
Heres what I’m doing in Gatsby:
<input type="hidden" name="bot-field"></input>
<input type="hidden" name="form-name" value="contact" />
<button className="contact-form-submit" type="submit">
Send <RiMailSendLine />
From what I can tell, all of the necessary attributes are in the form, but nothing appears in the Netlify UI on submission.
Also, when the form is submitted the page just seems to redirect to the root URL and not the
Thanks in advance for any help!
October 12, 2020, 5:27pm
Hiya, sorry you are having trouble getting your forms to work.
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!
If you are still having problems, please provide more information such as what you have already tried, and a link to your live form.
Hey Perry, thanks for the response!
I’ve read though the support guide and implemented all of the required fields, used POST and, as this is the only form on the site, there aren’t any duplicate field names.
The link to the live contact form is at the top of my initial post.
Interestingly, the Netlify form attribute tags which are present when running locally are removed on the deployment of the site. As I’m pretty new to Netlify, this might be normal but I’d appreciate if you could let me know for sure!
Live on Netlify (same commit as above):
This is still true after using the “Clear cache and deploy site” action.
October 17, 2020, 8:52pm
Can you try swapping the bot-field and form-name, so that the hidden input with the form-name comes first? I’m wondering if we’re expecting form-name to be the first attribute we look for, and when we don’t find it, we don’t know to match the submission with the form.
And for the redirect, could you try changing the action to
/ and then redirecting on success with Gatsby’s
navigate function? There’s a code sample in this post that shows how:
[Support Guide] Netlify forms with custom success pages for Gatsby and Nuxt
Let us know if that helps!
Thanks Jen, that’s fixed it!
Not sure how I didn’t find that support guide before but it’s a great resource for getting the form up and running with Gatsby.
Also, I had a play and found the form successfully submits messages whether the form-name field is first or elsewhere in the form (i.e after the bot-field).
In case it’s helpful to anyone, the code for the working form can be found