Add a Contact Form to Astro
Boosterpack Forms works with Astro out of the box — static builds, SSR, or hybrid. Just HTML and a script tag. No server-side code needed.
Setup Guide
Takes about 2 minutes
Sign in to your account dashboard and create a new form. Add your destination email(s) and optionally connect webhook integrations (Slack, Discord, etc.). Then copy your form ID.
Paste the form HTML into any .astro component or page. It's standard HTML — no framework adapter needed.
Add the script tag to your <head> in your layout component (e.g. Layout.astro). The script handles Proof-of-Work and spam protection automatically.
Deploy your site (Vercel, Netlify, Cloudflare Pages — anywhere). When you visit the page with your form, you'll see an overlay with an Activate form button. Click it and confirm via your inbox.
Code to Copy
Get your form ID from your account dashboard.
<form method="POST" action="https://boosterpackforms.com/api/forms/<FORM_ID>/submit">
<input name="name" placeholder="Name" required />
<input name="email" type="email" placeholder="Email" required />
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form><script src="https://boosterpackforms.com/embed.js" defer></script>React islands: If you're using Astro with React islands, you can also use the @boosterpack/react-form package instead of the embed script. See the Next.js / React guide.
Activating Your Domain
When you create a form, each recipient receives a confirmation email right away — they must confirm before receiving submissions.
When you load a page with your form on a domain that hasn't been activated yet, you'll see an overlay with an Activate form button. Click it to activate the domain. The form goes live once at least one recipient has confirmed and the domain is activated. This only happens once per domain.
What's Included
Free plan · No credit card required