Add a Contact Form to Your Astro Site
staticq gives your Astro site a form backend without server-side code or serverless functions. Point a standard HTML form at your staticq endpoint and submissions go straight to your inbox.
Code example
Create a component at src/components/ContactForm.astro:
---
// No server-side logic needed
---
<form action="https://api.staticq.app/q/your-form-slug" method="POST">
<label for="name">Name</label>
<input type="text" id="name" name="name" required />
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Send Message</button>
</form>
Use it in any page:
---
import ContactForm from '../components/ContactForm.astro';
---
<ContactForm />
Setup steps
- Create a form in the staticq dashboard. Give it a name and configure your notification email.
- Copy the endpoint — it looks like
https://api.staticq.app/q/your-form-slug. - Paste the endpoint into the
actionattribute of your form element. - Deploy and test. Submit the form and confirm the submission appears in your dashboard.
Get started
staticq is free to start with — no credit card required. Create your first form and have submissions flowing in minutes. See pricing for plan details.