FRAMEWORK
A form backend for your Alpine.js app
Alpine.js gives you a reactive form, but nothing on its own catches the submission. Point your @submit handler at Formstork and every entry is emailed to you and saved to a searchable dashboard, with no server to run.
How it works
Alpine.js handles the interactive part of your form: state with x-data, validation, and a submit handler wired up with @submit.prevent. What it cannot do on its own is receive and store the submission, because that needs a backend. Formstork is that backend. Your handler builds a FormData from the form and POSTs it to a Formstork endpoint with your access key, and Formstork emails you each submission, sets the visitor's email as the reply-to, and saves the entry to a searchable dashboard. Because the request is a plain fetch(), your Alpine component stays on any static host, with no server or serverless function to deploy.
<form
x-data="{
sending: false,
sent: false,
async submit(e) {
this.sending = true
const res = await fetch('https://api.formstork.com/submit', {
method: 'POST',
body: new FormData(e.target),
})
this.sending = false
this.sent = res.ok
if (res.ok) e.target.reset()
}
}"
@submit.prevent="submit"
>
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<input type="email" name="email" placeholder="Your email" required />
<textarea name="message" placeholder="Your message" required></textarea>
<button type="submit" :disabled="sending" x-text="sending ? 'Sending...' : 'Send'"></button>
<p x-show="sent">Thanks, your message was sent.</p>
</form>No backend, just a fetch()
Your Alpine handler POSTs the form data straight to Formstork, so there is no server to run and no serverless function to deploy. The same component works on any static host, from GitHub Pages to Netlify, Vercel, and Cloudflare Pages.
Every submission emailed and stored
Every submission emails you with the visitor's address set as the reply-to, so you hit reply and reach the person who wrote in. Each entry is also kept in a searchable, taggable dashboard you can filter and export to CSV or JSON.
Spam handled server-side
A hidden honeypot and a server-side content filter catch bots before they reach you, with optional Turnstile, hCaptcha, or reCAPTCHA when you want it. A rules engine can route, block, or redirect a submission based on a field value.
Set it up
- 1Build your form markup and drive it with Alpine using x-data, wiring the submit with @submit.prevent to your own handler.
- 2In the handler, send the fields with fetch() to https://api.formstork.com/submit, including your access key as an access_key field (a hidden input or a FormData entry).
- 3Read the response: on res.ok, show a success state and reset the form. Formstork has already emailed you and stored the entry.
- 4Optional: add spam protection (honeypot, Turnstile, hCaptcha, reCAPTCHA) or connect an integration like Slack, Notion, or Google Sheets.
Frequently asked questions
How do I handle form submissions in Alpine.js?
Wire your form's submit with @submit.prevent to a handler in x-data, then POST the fields with fetch() to a Formstork endpoint with your access key. Formstork receives the submission, emails it to you, and stores it in a searchable dashboard, so you never write or run a backend yourself.
Do I need a backend or server for an Alpine.js form?
No. Your Alpine component is plain HTML and JavaScript that can live on any static host. Formstork is the hosted backend that receives the POST and delivers every submission, so there is nothing for you to run or maintain.
Is it free?
Yes. The free plan includes 250 submissions a month with a full dashboard, email delivery, spam filtering, integrations, and 90-day retention, no credit card. Paid plans add more volume, forever retention, autoresponders, and file uploads or attachments.
Try Formstork free
250 submissions a month with a full dashboard. No credit card required.
Get your access keyRead the docs