Edit on val.town ↗

Put a form online and save submissions

The easiest way to put a form online is to remix a val that already is one. This template serves a contact form (name, email, message) at /, saves every submission to the val's own SQLite database, and lists everything received at /submissions. No form-builder service, no API keys, no environment variables.

db.ts creates the submissions table and holds the two queries, and the components/ files render the pages with Hono JSX. The form is a plain HTML POST — there's no client-side JavaScript at all.

  1. Remix this template — click the Remix button in the top right corner.
  2. Open the HTTP endpoint of main.tsx (shown on its HTTP trigger) — that's your live form. Share the URL.
  3. Visit /submissions on the same URL to see what people sent.

Last updated