A lightweight, responsive multi-page form flow built with HTML, CSS, Bootstrap 5, and vanilla JavaScript. Users fill out a modal form, and their details are carried over to a styled success page — no backend required.
- Modal-based form with HTML5 validation (
requiredfields) - Data persistence across pages via
localStorage - Success page that dynamically displays submitted details
- Fully responsive layout using Bootstrap 5
- Clean separation of concerns across
index.html,success.html, andscript.js
| Page | Description |
|---|---|
index.html |
Landing page with an "Open Form" button that triggers the modal |
success.html |
Confirmation page displaying the submitted user details |
- HTML5
- CSS3 (custom + Bootstrap 5.3.3)
- Vanilla JavaScript (ES6+)
- Google Fonts (Inter)
- Bootstrap 5.3.3
No build tools or dependencies to install. Just open the project in a browser.
git clone https://github.com/your-username/formflow.git
cd formflow
open index.htmlOr serve it locally with VS Code Live Server, or any static file server:
npx serve .- User lands on
index.htmland clicks Open Form - A Bootstrap modal appears with four fields: Name, Email, Phone, Gender
- On submit, values are saved to
localStorageand the user is redirected tosuccess.html success.htmlreads fromlocalStorageand displays the submitted details
formflow/
├── index.html # Landing page with modal form
├── success.html # Submission confirmation page
├── script.js # Shared JS logic for both pages
├── style.css # Custom styles
└── README.md
script.jsis shared across both pages and uses null guards (if (MyForm),if (NameInputted)) to safely run only the relevant logic per page- User input is written to the DOM using
textContent(notinnerHTML) to prevent XSS - No data is sent to any server — everything stays in the browser
MIT