A contact form for a site on Netlify
Netlify Forms is built in and reads your form from the HTML it deploys. Point the form at FormHaven instead and every message is stored in Germany for as long as you set, emailed to you and your client, and the form keeps working wherever the site moves next.
14 days free, no card. Paste the address where the code says YOUR_FORM_ID.
<form action="https://formhaven.net/f/YOUR_FORM_ID" method="POST">
<label>Your name <input type="text" name="name" required></label>
<label>Your email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<input type="hidden" name="_next" value="/thanks/">
<button type="submit">Send message</button>
</form>
Set it up
-
1
Take the Netlify attribute off
Remove netlify or data-netlify="true" from the form tag, and the hidden form-name field if you added one. Netlify's form detection then leaves the form alone.
-
2
Create a form in FormHaven
Sign up, press New form and copy its address. It looks like https://formhaven.net/f/YOUR_FORM_ID.
-
3
Set the action and deploy
Put your address in the action, with method POST, then push or run netlify deploy as usual.
-
4
Send a test
Open your netlify.app address or your own domain, fill in the form and check your inbox.
Forms that React or Vue draws
Netlify finds forms by reading the built HTML, so its docs ask for a hidden HTML copy of a form JavaScript draws, or a form-name field. A FormHaven form needs neither. It posts to its own address, whenever React or Vue draws it.
export function ContactForm() {
return (
<form action="https://formhaven.net/f/YOUR_FORM_ID" method="POST">
<input type="email" name="email" required />
<textarea name="message" required />
<input type="text" name="_gotcha" style={{ display: "none" }} tabIndex={-1} autoComplete="off" />
<button type="submit">Send</button>
</form>
);
}
Test from deploy previews
A deploy preview lives at an address like deploy-preview-42--SITENAME.netlify.app, which is not under SITENAME.netlify.app. If you limit the form to your own sites, a preview's messages go to spam, where you can still read them. Leave the list empty while you test, or list only your own domain and test on the live site. Localhost always works.
example.com
SITENAME.netlify.app
Stop bots that skip the hidden field
Turn on the bot check in the form's settings and add this line once to the page. Visitors see nothing, and it sets no cookies.
<script src="https://formhaven.net/bot-check.js" async></script>
Questions about this setup
- Why not keep Netlify Forms?
- If the site stays on Netlify and nobody asks where the messages live, it does the job. FormHaven adds storage in Germany with a retention period per form, copies to your client without our branding, and the privacy-policy paragraph for the form in eight languages.
- Do I need a Netlify Function?
- No. The form posts straight from the visitor's browser to FormHaven. Nothing runs on Netlify when a visitor presses Send.
- Does the form keep working if the site moves?
- Yes. The address does not depend on the host, so the same form works on Vercel, Cloudflare Pages, GitHub Pages or your own server.
- Can my client get the messages instead of me?
- Yes. Add up to 5 more addresses to the form. Each one confirms by a link first, and their copy carries no FormHaven branding. You can turn your own copy off.
- Where is the data stored?
- On our server at Hetzner in Falkenstein, Germany, for 1 to 365 days as you choose per form, or not at all. A data processing agreement covers every account.
More to read
Get your form address in a minute
14 days free, no card. Then €1 per form a month, €0.50 from the 11th form.