FRAMEWORK
Handle jQuery Ajax form submissions
Formstork is the backend that receives your jQuery form's Ajax POST. Send the form data to the Formstork endpoint with your access key, and every submission is emailed to you, saved to a searchable dashboard, and answerable by hitting reply. There is no server or API route to build.
How it works
jQuery is great for wiring up a form in the browser, but it has no server of its own to receive the submission. Formstork is that backend. You bind a submit handler with $(...).on("submit"), build a FormData from the form, append your access_key, and send it to https://api.formstork.com/submit with $.ajax(). The one detail that trips people up is that FormData needs processData: false and contentType: false, so jQuery does not serialize the values into a query string or reset the multipart body. Formstork receives the POST, emails you each submission with the visitor's email set as the reply-to, and stores it in a searchable, taggable dashboard. Because it is a plain Ajax request, it works on any page that already loads jQuery, with no build step and no server of your own. Turn on spam filtering, an autoresponder, or an integration like Slack or Google Sheets whenever you need it.
<!-- Contact form -->
<form id="contact">
<input type="email" name="email" placeholder="Your email" required />
<textarea name="message" placeholder="Your message" required></textarea>
<button type="submit">Send</button>
</form>
<script>
$("#contact").on("submit", function (e) {
e.preventDefault();
var data = new FormData(this);
data.append("access_key", "YOUR_ACCESS_KEY");
$.ajax({
url: "https://api.formstork.com/submit",
method: "POST",
data: data,
processData: false,
contentType: false,
dataType: "json",
success: function () {
$("#contact").replaceWith("<p>Thanks, we got your message.</p>");
},
error: function () {
alert("Something went wrong. Please try again.");
}
});
});
</script>No backend to build
Your page stays frontend-only. The form Ajax-POSTs straight to Formstork, so there is no Express server, PHP script, or serverless function to write, deploy, or keep alive just to collect a contact form.
FormData handled the right way
The classic jQuery gotcha is that $.ajax() tries to serialize your data and set its own content type. With processData: false and contentType: false, the browser sends a proper multipart body, which also lets you attach files on paid plans.
Spam filtered before it reaches you
A hidden honeypot and a server-side content filter catch bots automatically, and you can switch on Turnstile, hCaptcha, or reCAPTCHA when you want more. Every real submission is stored, searchable, and exportable to CSV or JSON.
Set it up
- 1Create a form in the Formstork dashboard and copy its access key. The free plan needs no credit card.
- 2Bind a submit handler with $("#contact").on("submit", ...), call e.preventDefault(), and build a FormData from the form with your access_key appended.
- 3Send it with $.ajax() to https://api.formstork.com/submit, setting processData: false and contentType: false so the FormData is posted correctly.
- 4Submit once to test. The entry lands in your inbox and dashboard, with the visitor's email set as the reply-to. Optional: use the success callback to show a thank-you state.
Frequently asked questions
How do I submit a form with jQuery Ajax without a backend?
Bind a submit handler, call e.preventDefault(), build a FormData from the form, append your access_key, and $.ajax() it to https://api.formstork.com/submit. Formstork is the backend: it receives the POST, emails you the submission, and stores it in a dashboard, so you write no server code.
Why do I need processData: false and contentType: false?
Because you are sending a FormData object. Without those two settings, jQuery serializes your data into a query string and sets the wrong content type, which breaks the multipart request. Setting both to false lets the browser build the correct body and boundary.
Is it free?
Yes. The free plan includes 250 submissions a month with the full dashboard, email delivery, spam filtering, integrations, CSV and JSON export, and 90-day retention, with no credit card. Paid plans add more volume, forever retention, autoresponders, and file uploads.
Try Formstork free
250 submissions a month with a full dashboard. No credit card required.
Get your access keyRead the docs