Question: Both codes Week 8 Lab - JavaScript DOM and Arrays Order Form Personal Information First Name: Last Name: Address: City: Province: Select a province British
Both codes
Order Form
-------------------------------------------------------------------------
Form Submitted Successfully
----------------------------------------
Instructions
The form provided is a basic order form for 'widgets'. The form accepts some personal information, item quanitites, and a shipping method. Your task is to ensure that the user inputs the correct data. In particular:
1. The firstName, lastName, address, city, province, and postalCode fields must all have a value.
2. The postalCode field must be 6 digits long
3. The quantity fields for the widgits must contain a number greater than or equal to zero
4. At least one item must be ordered
The user must be notified of the errors in the form. I am going to allow for some creativity on your part on how this is to be done. The only requirement is that it is clear to the user which fields have errors, and what the errors are.
Finally, if the form submission is valid, display an alert to the user confirming the successful submission of their form, and inform them of the total price. If there are errors in the form, it should not submit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
