Skip to content
SubmitYourForm

Guides

Astro & static sites

Astro, Hugo, Jekyll, Eleventy, Webflow and other static sites.

Static sites need nothing special: use a normal HTML form.

Astro

---
const formKey = import.meta.env.PUBLIC_SYF_FORM_KEY;
---
<form action="https://app.submityourform.com/f" method="POST">
  <input type="hidden" name="_form_key" value={formKey} />
  <input type="hidden" name="_redirect" value={new URL('/thanks', Astro.site).toString()} />
  <input name="name" required />
  <input name="email" type="email" required />
  <textarea name="message" required></textarea>
  <input type="text" name="_honeypot" tabindex="-1" autocomplete="off" style="display:none" />
  <button>Send</button>
</form>

The form key is public, so a PUBLIC_ environment variable is fine (Astro only exposes variables starting with PUBLIC_ to the page). Astro.site comes from site in astro.config.mjs; if you haven't set it, write the full thank-you URL instead, e.g. value="https://example.com/thanks".

Webflow, Framer, WordPress and site builders

Set the form's action to https://app.submityourform.com/f, the method to POST, and add a hidden field named _form_key. Turn off the builder's own form handling so it doesn't intercept the submit.

Restricting where submissions come from

In your form's Settings → Spam & security you can allow only your own domains (paid plans). Submissions from other sites are rejected with DOMAIN_NOT_ALLOWED.