Formstorkdocs
PricingENTRDashboard

Astro

Astro ships static HTML by default, which is exactly what Formstork needs. A plain form works with no client JavaScript.

---
// src/components/Contact.astro
const ACCESS_KEY = import.meta.env.FORMSTORK_KEY;
---

<form action="https://api.formstork.com/submit" method="POST">
  <input type="hidden" name="access_key" value={ACCESS_KEY} />
  <input type="hidden" name="redirect" value="https://yoursite.com/thanks" />

  <input type="email" name="email" required />
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>

Set FORMSTORK_KEY in your .env. Because the access key is safe to expose, you can also hard-code it.

With a client-side success message

Use an Astro <script> to handle the response without a page reload. See the HTML guide for the pattern; it works identically in Astro.