SvelteKit
Contact form for SvelteKit without a backend.
A SvelteKit contact form can work without a +page.server file, action handler, or server endpoint. Use a standard HTML form that posts to FormsFort and keep static deployments simple.
How it works
Three steps to production forms.
Create a form
Create a FormsFort form and copy the public access key.
Paste into Svelte
Add the form to +page.svelte or a reusable component.
Ship static or serverful
The same markup works with adapter-static, Vercel, Netlify, or any SvelteKit deployment.
Setup
SvelteKit page with contact form
<!-- src/routes/contact/+page.svelte -->
<form action="https://api.formsfort.com/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<label for="name">Name</label>
<input id="name" name="name" type="text" autocomplete="name" required />
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email" required />
<label for="message">Message</label>
<textarea id="message" name="message" rows="5" required></textarea>
<input type="checkbox" name="botcheck" style="display:none" />
<button type="submit">Send message</button>
</form> Migration
Migration checklist.
Move an existing form in minutes without rebuilding markup.
Create a FormsFort form and copy the public access key.
Add the form to src/routes/contact/+page.svelte.
Set the action to https://api.formsfort.com/submit.
Include required fields and the botcheck honeypot.
Use adapter-static or a server adapter without changing the form endpoint.
Test from the deployed domain so allowed-domain checks match production.
Related Resources
Keep building from here.
FAQ
Common questions.
Do I need SvelteKit form actions?
No. SvelteKit form actions are useful for server-side workflows, but a hosted form endpoint is enough for email delivery, spam controls, uploads, and webhooks.
Does this work with adapter-static?
Yes. The generated HTML posts directly to FormsFort, so no Node process or serverless function is required.
Can I show an inline success message?
Yes. Intercept submit, send the FormData with fetch(), and render the response in Svelte. The backend endpoint stays the same.
Can SvelteKit forms upload files this way?
Yes. Add enctype="multipart/form-data" and a file input, then enable uploads on the FormsFort form.
Stop managing form servers.
Create a production form endpoint, migrate your first form free, and scale when you are ready.