This project is a Medical History Intake Form built with HTML for structure, a small JavaScript snippet for interactivity, and styling defined in the accompanying styles.css file. You can replace this stylesheet or integrate frameworks like Bootstrap or Tailwind CSS for a different look.
It was created as a personal exercise after learning about HTML forms on Freecodecamp.
The form collects essential personal, contact, and medical information from a patient before a medical appointment.
It demonstrates:
- Use of different HTML form elements (text, textarea, radio, checkbox, date, email, etc.)
- Form structure using
<fieldset>and logical grouping - Basic client-side interactivity using JavaScript
- Collects personal details (name, date of birth, gender)
- Contact details (address, phone, email)
- Allergy selection (with โNoneโ logic that deselects others)
- Medication and known medical conditions
- Emergency contact details
- Preferred appointment date and signature area
- User-friendly layout and required fields for critical info
- Clone or download this repository.
- Open the
index.htmlfile in your browser. - Fill out the form and submit.
Note: The action attribute is currently set to /action_page.php.
You can change this to your desired endpoint or integrate with a backend for real data collection.
- Add/remove input fields or questions to suit your workflow.
- Style the form using the provided
styles.cssor swap in frameworks such as Bootstrap or Tailwind CSS for a custom appearance. - Enhance JavaScript for more validation or interactivity.
- Practice structuring accessible, user-friendly HTML forms
- Gain experience with client-side form logic (e.g., managing exclusive checkboxes)
- Understand form field requirements and data grouping