Framework guide
SvelteKit
Works with any adapter: static, Vercel, Netlify, Node. No form actions or +page.server.ts needed; the form posts straight to ShipMyForm.
Prefer Svelte bindings?: Install
@shipmyform/svelte for a createSubmit store and a use:shipmyform action for one-line progressive enhancement, see the JavaScript SDK.The simplest version
A plain form. Works even with adapter-static and zero JavaScript.
src/routes/contact/+page.svelte
<form action="https://shipmyform.com/f/frm_8Kx2mQ9pL4vN" method="POST">
<input type="email" name="email" placeholder="[email protected]" required />
<textarea name="message" placeholder="Your message"></textarea>
<input type="text" name="_gotcha" style="display:none" tabindex="-1" />
<button type="submit">Send</button>
</form>Stay on the page (fetch)
Send Accept: application/json to get a JSON response back instead of a redirect, and show your own success state.
src/routes/contact/+page.svelte
<script>
let sent = false;
async function submit(e) {
const res = await fetch("https://shipmyform.com/f/frm_8Kx2mQ9pL4vN", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(e.currentTarget),
});
sent = res.ok;
}
</script>
{#if sent}
<p>Thanks, we'll be in touch!</p>
{:else}
<form on:submit|preventDefault={submit}>
<input type="email" name="email" required />
<textarea name="message"></textarea>
<button type="submit">Send</button>
</form>
{/if}Give every input a clear name: that's what shows up in your dashboard and connectors.