Contact form for Netlify
Netlify has its own form handling, which it turns on when a form has a data-netlify or netlify attribute. To send a form to Pasteform instead (for Slack/Discord/Telegram alerts, multi-site agency management or another provider), use a plain form without those attributes.
Get my free form link Replace YOUR_FORM_ID below with your form ID, or copy the snippets from your dashboard where it's already filled in.
Step by step
- Create a form in Pasteform and copy the HTML snippet.
- Paste it into your page. Do not add
data-netlify="true",netlifyornetlify-honeypotto it. - Deploy, then add
yoursite.netlify.appand your custom domain to Allowed domains. - Submit a test from the live site.
contact.html
<form action="https://forms.prizenlabs.com/f/YOUR_FORM_ID" method="POST">
<label>Name <input type="text" name="name" required></label>
<label>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">
<button type="submit">Send</button>
</form>
<script>
// Optional: submit without leaving the page.
document.querySelectorAll('form[action="https://forms.prizenlabs.com/f/YOUR_FORM_ID"]').forEach((form) => {
form.addEventListener("submit", async (e) => {
e.preventDefault();
const button = form.querySelector('button[type="submit"]');
button.disabled = true;
try {
const res = await fetch(form.action, {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
const data = await res.json();
if (!res.ok || !data.success) throw new Error(data.message);
form.innerHTML = "<p>Thanks! We'll be in touch soon.</p>";
} catch (err) {
alert(err.message || "Sorry, something went wrong. Please try again.");
button.disabled = false;
}
});
});
</script>
Allowed domains
Add yoursite.netlify.app and your custom domain. Deploy previews have their own hostnames (deploy-preview-N--yoursite.netlify.app); add the ones you test on.
Common pitfalls
- If submissions land in Netlify's dashboard instead of Pasteform, a
netlifyattribute is still on the form, or a build plugin added one. - For React/Vue on Netlify, use the fetch version from the Next.js guide; it works the same anywhere.
What you get
- Email notifications with Reply-To set to your visitor, plus optional Slack, Discord, Telegram or webhook alerts.
- Spam protection: honeypot, rate limits, domain allow-list, optional Cloudflare Turnstile.
- Submissions stored for as long as you choose (or not at all), with CSV export and one-click deletion.
- Free for 250 submissions a month; Pro is $9/month for 5,000.
Guides for other platforms
Lovable · Bolt · v0 · Framer · Webflow · Astro · Next.js · Hugo · Jekyll · GitHub Pages · Vercel · WordPress (static export) · Carrd · plain HTML