Forms
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
index.ts
https://kyumz--c5665ada3fa411f0ae9576b3cceeab13.web.val.run
A comprehensive form builder application that allows users to create custom forms with drag-and-drop functionality, share them via links, and manage responses.
- Form Creation: Drag-and-drop form builder with various input types
- Input Types: Text, email, dropdown, checkboxes, radio buttons, textarea, number, date
- Form Sharing: Automatic link generation for sharing forms
- Response Management: View responses in a dashboard and export to CSV
- Email Notifications: Optional email notifications for form submissions
- Embed Support: Generate embed codes for websites
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema setup
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ ├── forms.ts # Form CRUD operations
│ │ ├── responses.ts # Response handling
│ │ └── static.ts # Static file serving
│ └── index.ts # Main Hono server
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main application component
│ │ ├── FormBuilder.tsx # Drag-and-drop form builder
│ │ ├── FormRenderer.tsx # Form display and submission
│ │ └── Dashboard.tsx # Response dashboard
│ ├── index.html # Main HTML template
│ └── index.tsx # Frontend entry point
└── shared/
└── types.ts # Shared TypeScript types
- The app runs on Val Town's serverless platform
- Access the form builder at the root URL
- Create forms using the drag-and-drop interface
- Share forms using the generated links
- View responses in the dashboard
GET /
- Form builder interfacePOST /api/forms
- Create a new formGET /api/forms/:id
- Get form detailsGET /form/:id
- Public form viewPOST /api/forms/:id/submit
- Submit form responseGET /api/forms/:id/responses
- Get form responsesGET /api/forms/:id/export
- Export responses to CSV