Connect SvelteKit forms to email
Connect a SvelteKit contact page directly to GlueForms. An external HTML POST works without a SvelteKit server action for this form.
Connect the form
-
Copy your receiving URL from Forms, or select your form above.
-
Create
src/routes/contact/+page.svelte. Its location defines the/contactroute. -
Add the form below to the page. Keep the destination as the full receiving URL rather than a relative SvelteKit action.
<svelte:head>
<title>Contact us</title>
</svelte:head>
<h1>Contact us</h1>
<form action="YOUR_FORM_URL" method="POST">
<label>
Name
<input name="name" autocomplete="name" />
</label>
<label>
Email
<input name="email" type="email" autocomplete="email" required />
</label>
<label>
Message
<textarea name="message" rows="4" required></textarea>
</label>
<button type="submit">Send message</button>
</form>Do not add use:enhance to this external form. SvelteKit’s helper expects its own server actions and action-response format. For an inline confirmation, handle the browser request yourself.
A native submission opens the thank-you page or your saved redirect. Use JavaScript for confirmation on your own page.
Publish the page, submit a message and check its saved fields and email notification in GlueForms.
Official documentation: SvelteKit routing, SvelteKit form actions.