ADL LAB-III-Jan 06
ADL LAB-III-Jan 06
LAB-III
Date:- 06/01/2025
C. You are going to create an input form using HTML and Javascript. This input form will
not submit any database to the server. It will validate and collect information from the
user and go to a confirm page that displays the information entered and allows the user to
confirm that the information is correct. Below are all the input form fields and the
validation required.
It is up to you (the designer) how you present the information request. For example, in
entering a date you can have a single text box, or you can have multiple boxes with
drop-down choices. You do, however, have to validate the data to make sure it meets all
validation rules.
Field Validation
Name The user must enter a first and last name. These cannot be
blank. You may use a single text box, but must check for 2
names, or use 2 text boxes.
Address The user must enter a valid mailing address that follows address
rules. A city, state, and zip code must also be included as part of
the address. You can use multiple text boxes – or a single one.
You must still validate all elements.
Phone Number A full 10-digit phone number must be entered (including area
code). Use an input mask to make the entry easy for the user.
Read StackOverflow responses to the creation of input masks
using jQuery.
Email Address The user must enter a correctly formatted email address
[email protected]
Birth Date The user must enter a valid birthday, make sure to check the
format and also the date – if dates are unreasonable (like in the
future) give a warning.
Message The user will enter a free text message, you should have a
multi-line text entry area for the message
Confirmation A simple confirmation method to ensure that the fields are not
filled out by a machine, you can use a captcha or simple
security question (like what is the last name of the current
president)
Once the user enters all this information in the form and hits submit, you will present the
information and allow the user to confirm that it is all correct. The user should not be able
to enter invalid data or leave fields blank. The form will be sent to your email address
using the form action=”mailto:address” (you can get examples of this at:
http://www.javascript-coder.com/javascript-form/javascript-email-form.phtml)