Create a simple, Microsoft Forms-like response collection system using flat files (no database) with HTML, PHP, JS, and CSS. The system will support creating forms via drag-and-drop, storing data on a shared hosting environment, capturing answers with user memory, sending native PHP emails, and viewing responses through a secure admin link.
Since there is no database, we will use JSON files to store forms and responses.
/data directory)/data/forms/<form_id>.json - Stores form structure (questions, types, creation details)./data/answers/<form_id>_<answer_id>.json - Stores individual submitted responses.1. Form Creation (create mode)
<form_id> and a unique <admin_token>.2. Form Answering (answer mode)
answer.php?id=<form_id>).localStorage / cookies to remember the user on future visits.mail().3. Admin View (admin mode)
admin.php?id=<form_id>&token=<admin_token>.docs/style_system.md (e.g., #2f3541 deep surface area, #cac300 accents).Implementation of the portable intranet style system spec (variables, spacing, grids, dark theme, typography).
Drag-and-drop logic for adding questions. Generating form payload for submission.
Client-side logic for caching Name/Email, validating submissions, and enforcing single-submit-per-person logic.
Landing page with a split choice: "Create a Form".
The drag and drop editor view and the PHP handler for saving the form JSON.
The page that loads a specific form's JSON and renders it for the end user to fill out.
PHP endpoint that receives a form submission, saves the answer JSON, and dispatches native PHP notification emails.
The private dashboard for viewing form submissions. Loaded via a secret token.
A security lock to prevent direct public access to raw JSON files.
[!WARNING]
Before proceeding, please confirm the following details:
- Drag-and-Drop Complexity: Are simple text inputs and text areas enough for questions, or do you require multiple-choice capabilities (radio/checkbox/dropdowns) in the form builder for version 1?
- Double Submission: Since there are no user accounts, is remembering the user via cookies/LocalStorage sufficient to prevent double submissions?
- Validation: Should we use external JS libraries for the drag-and-drop (like SortableJS) via CDN, or should I write a lightweight native HTML5 Drag and Drop implementation?
docs/style_system.md values properties exactly using browser dev tools.syslog if native mail() is tricky to verify externally).