KiranAminPanjwani / MedStats

A Personal Health Journal Website
https://medstats-health-journal.netlify.app/
MIT License
30 stars 53 forks source link

Contact Page Form Submission Error and Input Validation #147

Open hariraghav10 opened 11 months ago

hariraghav10 commented 11 months ago

🛠️ Fixes Issue: #146

Type of change

Please delete options that are not relevant.

👨‍💻 Changes proposed:

Summary: The form action attribute is removed for now for resolving the issue where the form submission was causing a broken site experience and resulting in a "No Webpage Found" error. Also, added client side user input validation for the form data before submission

Motivation: The proposed changes aim to fix a critical bug on the contact page, which currently make no validation on the user data and post the data to the broken page. By fixing this, we ensure that user-submitted data is processed correctly, providing a seamless and error-free experience for website visitors.

✔️ Check List (Check all the applicable boxes)

📷 Screenshots

  1. Alert for submitting without Name Field:

MedStat-after-1

  1. Alert for submitting without Email Field:

MedStat-after-2

  1. Alert for submitting without Message Field:

MedStat-after-3

  1. Submission occurs and no error after it:

MedStat-after-4

📄 Note to reviewers

netlify[bot] commented 11 months ago

Deploy Preview for medstats-health-journal ready!

Name Link
Latest commit cca6692226dab034ae3aaef75e8fc4fe4fc23688
Latest deploy log https://app.netlify.com/sites/medstats-health-journal/deploys/6540e9debd704c0008e82f5b
Deploy Preview https://deploy-preview-147--medstats-health-journal.netlify.app/contactus
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

hariraghav10 commented 11 months ago

@KiranAminPanjwani can you please review these fixes