Add a contact form to a Gatsby site
Build a working contact form for a Gatsby static site without a backend.
- 1
Add a React form component
Create a form component with controlled inputs and a `handleSubmit` that calls `fetch` to FormLoom.
- 2
Import it in your page
Drop the component into any Gatsby page or layout.
- 3
Build and deploy
Gatsby builds statically; FormLoom handles submissions from the browser at runtime.
FAQ
Only if you add the `netlify` attribute to the form. Without it, the form POSTs to FormLoom as normal.