FRAMEWORK
A form backend for SvelteKit
Formstork receives the submissions from your SvelteKit forms, emails you each one, and saves it to a searchable dashboard. No API route to build, no server to run, no database to wire up.
How it works
SvelteKit gives you two natural places to handle a form: a client-side submit handler in +page.svelte, or a server form action in +page.server.js. Either way, the request needs a backend to actually receive it, and that is Formstork. Your form sends its fields, plus a hidden access_key, to https://api.formstork.com/submit, and Formstork emails you each submission, sets the visitor's email as the reply-to, and stores it in a searchable, taggable dashboard. Use fetch() from a +page.svelte handler when you want it purely client-side, or post from a +page.server.js action when you prefer to keep the request off the browser. Turn on spam filtering, autoresponders, or an integration like Slack or Google Sheets whenever you need them.
<!-- src/routes/contact/+page.svelte -->
<script>
let status = "";
async function handleSubmit(event) {
const data = new FormData(event.currentTarget);
data.append("access_key", "YOUR_ACCESS_KEY");
const res = await fetch("https://api.formstork.com/submit", {
method: "POST",
body: data,
headers: { Accept: "application/json" },
});
status = res.ok ? "Thanks, your message was sent." : "Something went wrong.";
}
</script>
<form on:submit|preventDefault={handleSubmit}>
<input name="name" placeholder="Your name" required />
<input type="email" name="email" placeholder="you@example.com" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>
{#if status}<p>{status}</p>{/if}No API route or database to build
You do not need a +server.js endpoint, a form action wired to a database, or any hosting for it. Your SvelteKit form posts straight to Formstork, which receives, delivers, and stores every submission for you.
Client-side or server action, your call
Post from a +page.svelte handler with fetch() to keep everything on the client, or from a +page.server.js action to keep the request off the browser and out of your bundle. The same access key and endpoint work for both.
Every submission, kept and searchable
Beyond the email, Formstork saves each submission in a searchable, taggable dashboard you can filter and export to CSV or JSON. Spam is caught by a honeypot, a content filter, and optional Turnstile, hCaptcha, or reCAPTCHA before it ever reaches you.
Set it up
- 1Create a route with your form, such as src/routes/contact/+page.svelte, and give each input a name attribute (those become the fields you receive).
- 2In a submit handler, build a FormData from the form, append your access_key, and POST it to https://api.formstork.com/submit with fetch() (or POST from a +page.server.js action instead).
- 3Sign up at app.formstork.com, copy your access key from the dashboard, and swap it in for YOUR_ACCESS_KEY.
- 4Submit once to test. The entry lands in your inbox and your dashboard, with the visitor's email set as the reply-to. Optional: turn on spam protection or an integration.
Frequently asked questions
How do I handle form submissions in SvelteKit?
Give your form fields name attributes, then in a submit handler build a FormData, append your access_key, and POST it to https://api.formstork.com/submit with fetch(). Formstork receives the request, emails you the submission, and stores it in your dashboard. You can also POST from a +page.server.js form action if you prefer.
Do I need a +server.js endpoint or a database?
No. Formstork is the hosted backend, so you do not write a +server.js route, run a server, or wire up a database. Your form posts to the Formstork endpoint and every submission is delivered to your inbox and saved to your dashboard.
Does it work with SSR and static SvelteKit builds?
Yes. A client-side fetch() from +page.svelte runs in the browser, so it works the same whether your SvelteKit app is server-rendered, prerendered, or a fully static adapter-static build. For server-rendered routes you can also post from a +page.server.js action. The free plan covers 250 submissions a month with no credit card.
Try Formstork free
250 submissions a month with a full dashboard. No credit card required.
Get your access keyRead the docs