splitforms.com
ALPINE.JS · CONTACT FORM

Contact form for Alpine.js sites

Alpine.js's tiny footprint pairs naturally with splitforms — declare `x-data` for state, `@submit.prevent` for the handler, and POST to splitforms. No build step, no SPA framework, no server route.

Updated May 21, 2026 · Tested with standard HTML form submissions

1,000 free submissions every month.·No credit card.
contact.htmlhtml28 lines
01<form
02 x-data="{
03 status: 'idle',
04 async submit(e) {
05 this.status = 'loading';
06 const fd = new FormData(e.target);
07 const res = await fetch('https://splitforms.com/api/submit', {
08 method: 'POST', body: fd
09 });
10 const data = await res.json();
11 this.status = data.success ? 'ok' : 'err';
12 if (data.success) e.target.reset();
13 }
14 }"
15 @submit.prevent="submit"
16>
17 <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
18 <input name="name" required />
19 <input name="email" type="email" required />
20 <textarea name="message" required></textarea>
21 <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" />
22 <button :disabled="status === 'loading'" type="submit">
23 <span x-show="status === 'idle'">Send</span>
24 <span x-show="status === 'loading'">Sending…</span>
25 </button>
26 <p x-show="status === 'ok'">Thanks!</p>
27 <p x-show="status === 'err'">Error — try again.</p>
28</form>
1,000
submissions / mo, free
14ms
median latency, edge
0
lines of backend code
25+
frameworks supported
§ 01Setup3 steps · 60 seconds · zero config

Ship a Alpine.js contact form without a backend.

No SDK, no PHP, no plugin. Your form posts standard FormData to one URL — submissions land in your inbox.

STEP 01GENERATE

Get your free access key

Verify your email and your access key is generated instantly. Free for 1,000 submissions per month, forever.

Create your form

By signing up, you agree to our terms and privacy policy.

STEP 02EMBED

Drop in the Alpine.js code

Copy the Alpine.js snippet on the right and paste it into your project. Replace YOUR_ACCESS_KEY with the key from step 1.

snippethtml
<form
…
STEP 03RECEIVE

Submissions land in your inbox

Hits your dashboard and email in seconds. Forward to Slack, Discord, Sheets, Notion, or any signed webhook URL.

inbox · 1 newjust now
FROM contact@yoursite.com
New Alpine.js form submission
Maya Iyer maya@studio71.co
Loved the new pricing page — quick question about the 4-year plan. Are usage limits per project or account-wide?
§ 02Live demosandboxed · no key required · no submission sent

Try it now — no signup, no key.

This is a styled HTML preview of what your Alpine.js form will look like. Submitting opens a confirmation, no real request is sent.

preview · alpine.jslocalhost:3000
✦ what just happened

Your Alpine.js form posts FormData to /api/submit. Splitforms validates the access key, runs the spam classifier, and forwards the parsed submission to your inbox plus the dashboard.

  • 14ms median round-trip from the edge.
  • Honeypot + classifier, no CAPTCHA.
  • Per-domain key locking out of the box.
REQUEST · POST /api/submit
{
  "access_key": "sk_live_4f9a_••••",
  "name":       "Maya Iyer",
  "email":      "maya@studio71.co",
  "message":    "…"
}
← 200 OK · { "success": true } · 14ms
§ 03Best practices5 rules · production-tested

How to ship this without regrets.

Five rules that make the difference between a form that works in the demo and a form that survives launch traffic.

  1. 01

    Lock the access key to your domains. The dashboard accepts a list — anyone copying the key from your bundle can't replay it from another origin.

  2. 02

    Add the hidden honeypot input. Bots fill every field; humans don't see it. Splitforms rejects any submission that has it set.

  3. 03

    Show submit state visually. Disable the button and label it 'Sending…' while the request is in flight — users hammer submit on slow networks otherwise.

  4. 04

    Use the redirect field for a thank-you page. Browsers with JavaScript disabled (or strict tracking blockers) still need a destination.

  5. 05

    Validate email server-side too. Browser type="email" only checks format; spam bots send valid-format throwaway addresses by the thousand.

§ 05Comparisonvs web3forms

splitforms vs web3forms.

What you get for free vs what you build, pay for, or do without.

FeatureWeb3Formssplitforms
Free monthly submissions250 (Web3Forms)1,000
Custom redirect URLYesYes
File uploadPro plan onlyPro plan
Webhooks (Slack / Discord)Paid tierFree, signed
AI / MCP submission inboxNoYes
§ 07Questions4 answered

Things developers ask before they integrate.

Direct answers, no marketing fluff. Missing one? Email hello@splitforms.com.

01Is splitforms really free?
Yes — 1,000 submissions per month forever, no credit card. Pro is $5/mo for 5,000 submissions and file uploads; the 4-year plan is a flat $59 (not lifetime).
02Do I need to install anything?
No. Splitforms is API-only. There's no SDK, no plugin, no PHP. Your form posts standard FormData to one URL.
03How do you handle spam?
A hidden honeypot field catches the obvious bots. A tuned classifier scores everything else and quarantines the noise. You see clean submissions only.
04Can I keep my access key out of the bundle?
Yes — use a server-side environment variable and post from a server route or server action. Or expose it client-side and rely on per-domain locking. Either path is supported.
✻ ✻ ✻

Ship your Alpine.js contact form in 60 seconds.

1,000 free submissions per month. No credit card. Lock the access key to your domains, paste the snippet, watch submissions land in your inbox.

Get free access key →Read the docs
v0.1 · founders pricing locked in · early access open