For Homework 2, I developed an enhanced version of my MediForm Patient Registration Form. This form allows users to enter personal, contact, visit, and account information in a structured and user-friendly way.
Compared to Homework 1, this version includes a Review feature that allows users to view all entered data before submitting the form. The review section is hidden by default and becomes visible only when the user clicks the Review button.
I implemented HTML validation and pattern matching to ensure proper data entry. This includes validation for names, email format, phone number format, ZIP code, and user ID requirements. Each input field also includes a title attribute that provides helpful instructions to the user.
JavaScript was used to add dynamic functionality. The page displays the current date, updates the slider value in real time, formats the phone number automatically, converts the user ID to lowercase, and checks password rules. The password cannot match or contain personal information such as the user ID or name, and both password fields must match.
The Review section displays a summary of the entered data and includes PASS or ERROR messages for important fields. This allows users to verify their information before submitting the form.
The part I am most satisfied with is the Review feature, as it improves usability and aligns closely with the assignment requirements. The dynamic behavior of the form, especially the phone formatting and password validation, also enhances the overall user experience.