Public
Like
test-Form
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of test branch: v2View latest version
A simple contact form application that collects user submissions and stores them in SQLite database.
- Contact Form: Clean, responsive form with name, email, and message fields
- Form Validation: Client-side and server-side validation
- SQL Storage: All submissions are stored in SQLite database
- Submissions Display: View all recent submissions on the same page
- Real-time Updates: Form submissions update the display immediately
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema and table creation
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ └── submissions.ts # API routes for form submissions
│ └── index.ts # Main Hono app entry point
├── frontend/
│ └── index.html # Contact form UI
└── README.md
GET /api/submissions- Retrieve all form submissionsPOST /api/submissions- Create a new form submission
The form_submissions_1 table contains:
id(INTEGER PRIMARY KEY) - Auto-incrementing submission IDname(TEXT NOT NULL) - Submitter's nameemail(TEXT NOT NULL) - Submitter's email addressmessage(TEXT NOT NULL) - The message contentcreated_at(DATETIME) - Timestamp of submission
- Visit the application URL
- Fill out the contact form with your name, email, and message
- Click "Submit Message"
- View your submission appear in the "Recent Submissions" section below the form
- Backend: Hono framework with TypeScript
- Database: SQLite via Val Town's sqlite utility
- Frontend: Vanilla HTML/CSS/JavaScript with TailwindCSS
- Styling: TailwindCSS via CDN