[Feature]: Improve Contact Form Validation and UX Enhancements
Closed this issue · 2 comments
Is your feature request related to a problem? Please describe.
The current contact form lacks robust validation, clear error messaging, and feedback while the form is being submitted. This leads to confusion for users, especially when fields are left blank or filled out incorrectly. Additionally, there is no loading indicator to show that the form is being processed, which may cause users to assume the form submission has failed.
Describe the solution you'd like
Add specific error messages for missing fields (name, email, message) to provide clear feedback to the user.
Implement email validation to ensure proper email formatting.
Introduce a loading state while the form is being submitted to improve user experience.
Refactor modal usage to avoid duplicate rendering and ensure it closes automatically after a timeout.
Enhance responsiveness and accessibility of the form (e.g., aria-labels for screen readers).
Describe alternatives you've considered
Keeping the form as-is with basic validation, but this would not improve the user experience and might lead to more form submission errors or confusion.
Using a different library for handling form validation (e.g., Formik), but this would increase dependencies unnecessarily for a simple form.
Additional context
These changes will ensure a more user-friendly experience when filling out and submitting the contact form.
@pradeeptosarkar Please check it out i made a PR for this.
closing as resolved