Skip to content

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

  1. Create a form in the staticq dashboard. Give it a name and configure your notification email.
  2. Copy the endpoint — it looks like https://api.staticq.app/q/your-form-slug.
  3. Paste the endpoint into the action attribute of your form element.
  4. 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.

Start collecting submissions in minutes

Free for 100 submissions/month. No credit card required.

Create your first form