DEV Community

Discussion on: How To Use Netlify Forms With Gatsby

Collapse
johnrock profile image
John Rock • Edited on

Only thing I am doing is setting the state and adding a hidden field like below and my forms work fine with Gatsby and Netlify.
<input type="hidden" name="form-name" value="Newsletter" />

I am doing it wrong or is this over engineered?

Collapse
travislramos profile image
Travis Ramos Author

It depends on if you are using AJAX to submit the form. I'm guessing you are not since it is working fine for you. If you where however, you would need to make sure the content is URL-encoded to work properly.

Hope this helped!

Collapse
johnrock profile image
John Rock

Got it, that makes sense. Good read thanks!

Some comments have been hidden by the post's author - find out more