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.
The form server
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.
Set it up
- Remix this template — click the Remix button in the top right corner.
- Open the HTTP endpoint of
main.tsx(shown on its HTTP trigger) — that's your live form. Share the URL. - Visit
/submissionson the same URL to see what people sent.
Notes
- Each remix gets its own private SQLite database, so your submissions stay with your copy. You can also browse them in the val's SQLite tab.
/submissionsis public by default. If your form collects anything sensitive, protect that route — the auth guide shows how to add basic or password auth — before sharing the form URL.- To change the fields, edit the form in
components/FormPage.tsx, the validation inmain.tsx, and the table indb.ts.
Next steps
- SQLite reference — querying and migrating your submissions table
- Save HTML form data — the same pattern built up from scratch
- HTTP val reference — routing, JSX, and custom domains
Last updated