AJAX Contact Form (JavaScript, no page reload)
A contact form that POSTs via fetch() and updates the DOM inline. No page reload, no jQuery dependency, no framework — just HTML + 15 lines of vanilla JS pointed at splitforms.
Inline submission feedback (no page reload) is the conversion-rate standard in 2026. You don't need jQuery, axios, or a framework to do it — fetch() plus FormData has been baseline browser support for years. The trick is wiring it to a backend that returns clean JSON. splitforms's `/api/submit` returns `{ success: true, message: "..." }` on success and a structured error otherwise, so your status state machine is four lines of code.
- →Basic contact form · 4 fields
- →HTML, JS, React, PHP, cURL outputs
- →One POST endpoint, no SDK
- →Honeypot + classifier, no CAPTCHA
See exactly what your visitors see — and you’ll receive.
Left: the rendered form, fully interactive in a sandboxed iframe. Right: the email and dashboard view that lands the moment a visitor submits.
Every submission becomes an email plus a dashboard row. The fields below are the exact payload your form will send. Reply-to is wired to the visitor’s email so hitting reply goes back to them.
Iframe is sandboxed — submit doesn’t actually fire. Get your access key to wire it up live.
Generate, embed, receive.
Three actions stand between you and your first lead. None of them require a backend, a database, or a CAPTCHA library.
Paste the form HTML
Standard form markup — no `data-` attributes, no framework-specific syntax. The form doesn't even need a method or action because JavaScript intercepts the submit.
Add the fetch handler
Listen for submit, prevent default, FormData(form) → fetch POST to splitforms. The response JSON tells you whether to show success or error UI.
Style the four states
idle / loading / ok / err. Toggle classes or render different text — that's the whole UX.
Five outputs. One backend.
HTML by default. Click open the language you ship in — every variant POSTs to the same /api/submit endpoint.
Replace YOUR_ACCESS_KEY with the key from your dashboard. That’s the only edit.
One template. Every framework.
The same field set works on every framework splitforms supports. HTML, React, Next.js, Vue, Astro, Hugo, WordPress — same POST, same backend.
Things people ask before they ship.
Direct answers, no marketing fluff. Missing one? Email hello@splitforms.com.
Ship your ajax contact form (javascript, no page reload) in 60 seconds.
1,000 free submissions per month. No credit card. Copy the snippet, paste your access key, watch leads land in your inbox.