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.

Start paid plan Book free migration

How it works

Three steps to production forms.

01

Create a form

Create a FormsFort form and copy the public access key.

02

Paste into Svelte

Add the form to +page.svelte or a reusable component.

03

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>
Start paid plan

Migration

Migration checklist.

Move an existing form in minutes without rebuilding markup.

01

Create a FormsFort form and copy the public access key.

02

Add the form to src/routes/contact/+page.svelte.

03

Set the action to https://api.formsfort.com/submit.

04

Include required fields and the botcheck honeypot.

05

Use adapter-static or a server adapter without changing the form endpoint.

06

Test from the deployed domain so allowed-domain checks match production.

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.

Start paid plan Book free migration