Write an HTML form that includes the labels, inputs, and similar default settings as seen in the following screenshot. It does not need to look identical to the screenshot, you should use your own CSS styles and design, but the form must be valid, accessible, and all form components should be well-aligned. - - Firstname: Lastname: Student ID: Password: Date: Course: Submit 2022-06-28 Choose your course: Show The Firstname, Lastname and Student ID fields are type text inputs The Password field is a type password input The Date field is a type date input Courses is a select/option box with following options: 'Choose your course', 'COMP1850', 'COMP2132', 'COMP2913', 'COMP3012', 'COMP3015' The 'Choose your course' option should include the selected and disabled attributes The Submit button is a submit input type The ? and 'Show/Hide' components can be any HTML element you think is suitable (an tag, a , something else?) The form action should send data to a file named thank-you.html. The thank-you.html file can simply include content that thanks the user for filling in the form, it does not need to actually process the form data.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter13: Web Site Applications
Section: Chapter Questions
Problem 3E
icon
Related questions
Question
REQUIREMENTS
Write an HTML form that includes the labels, inputs, and similar default settings as seen in the
following screenshot. It does not need to look identical to the screenshot, you should use your
own CSS styles and design, but the form must be valid, accessible, and all form components
should be well-aligned.
-
Firstname:
Lastname:
Student ID:
Password:
Date:
Course:
Submit
2022-06-28
Choose your course:
Go
?
Show
O
The Firstname, Lastname and Student ID fields are type text inputs
The Password field is a type password input
The Date field is a type date input
Courses is a select/option box with following options:
'Choose your course', 'COMP1850', 'COMP2132', 'COMP2913', 'COMP3012;
'COMP3015'
The 'Choose your course' option should include the selected and disabled attributes
The Submit button is a submit input type
The ? and 'Show/Hide' components can be any HTML element you think is suitable (an
<a> tag, a <button>, something else?)
The form action should send data to a file named thank-you.html. The thank-you.html file can
simply include content that thanks the user for filling in the form, it does not need to actually
process the form data.
Transcribed Image Text:REQUIREMENTS Write an HTML form that includes the labels, inputs, and similar default settings as seen in the following screenshot. It does not need to look identical to the screenshot, you should use your own CSS styles and design, but the form must be valid, accessible, and all form components should be well-aligned. - Firstname: Lastname: Student ID: Password: Date: Course: Submit 2022-06-28 Choose your course: Go ? Show O The Firstname, Lastname and Student ID fields are type text inputs The Password field is a type password input The Date field is a type date input Courses is a select/option box with following options: 'Choose your course', 'COMP1850', 'COMP2132', 'COMP2913', 'COMP3012; 'COMP3015' The 'Choose your course' option should include the selected and disabled attributes The Submit button is a submit input type The ? and 'Show/Hide' components can be any HTML element you think is suitable (an <a> tag, a <button>, something else?) The form action should send data to a file named thank-you.html. The thank-you.html file can simply include content that thanks the user for filling in the form, it does not need to actually process the form data.
<INPUT TYPE='DATE'> RESTRICTIONS
Determine the present day using a JavaScript Date Object, and use this value to set the
attributes value="and min=" so that the default date is today's date, and the user cannot
choose a date in the past. Note these attributes require the format YYYY-MM-DD, which will
need leading zeros if the month or day is a single digit. Examples for working with a Date Object
are available from Session04 > code > date.js
TOOLTIP POPUP
Have a CSS styled tool tip popup in the HTML that is not displayed by default. It should explain
to the user what a valid BCIT ID looks like. If user hovers mouse over the question mark '?'
display the tool tip popup positioned next to the question mark. When the user mouse moves
out and away from the question mark, hide the popup.
SHOW/HIDE PASSWORD
Each time the user clicks on the 'Show Password' button, toggle between the following two
states:
- The button label is 'Show' and the Password input field is type password
- The button label is 'Hide' and the Password input field is type text
FORM VALIDATION
When the user submits the form, have Javascript perform the following validation procedures:
- The Firstname, Lastname, Student ID and Password form inputs cannot be left empty,
they must all contain user supplied text. Space bar spaces do not count as text.
The Courses form field must have a course selected: the user is not allowed to leave the
option on the default "Choose a course:" option.
The student id must match the following regular expression for BCIT student numbers:
const studentNumberRegEx = /^a0[0-9][7]$/i;
Display descriptive error messages to the web browser for any and all form fields that are
not filled out correctly.
Change the CSS style of any inputs that do not have valid values to highlight their
location in the form. If a field has been filled out correctly, inputs must not have any error
highlights applied.
If any problems are detected during validation, prevent the browser from sending the
data to the page defined in the form's action attribute by using preventDefault()
If no problems are detected during validation, allow the browser to forward the user to
the thank-you.html page.
Transcribed Image Text:<INPUT TYPE='DATE'> RESTRICTIONS Determine the present day using a JavaScript Date Object, and use this value to set the attributes value="and min=" so that the default date is today's date, and the user cannot choose a date in the past. Note these attributes require the format YYYY-MM-DD, which will need leading zeros if the month or day is a single digit. Examples for working with a Date Object are available from Session04 > code > date.js TOOLTIP POPUP Have a CSS styled tool tip popup in the HTML that is not displayed by default. It should explain to the user what a valid BCIT ID looks like. If user hovers mouse over the question mark '?' display the tool tip popup positioned next to the question mark. When the user mouse moves out and away from the question mark, hide the popup. SHOW/HIDE PASSWORD Each time the user clicks on the 'Show Password' button, toggle between the following two states: - The button label is 'Show' and the Password input field is type password - The button label is 'Hide' and the Password input field is type text FORM VALIDATION When the user submits the form, have Javascript perform the following validation procedures: - The Firstname, Lastname, Student ID and Password form inputs cannot be left empty, they must all contain user supplied text. Space bar spaces do not count as text. The Courses form field must have a course selected: the user is not allowed to leave the option on the default "Choose a course:" option. The student id must match the following regular expression for BCIT student numbers: const studentNumberRegEx = /^a0[0-9][7]$/i; Display descriptive error messages to the web browser for any and all form fields that are not filled out correctly. Change the CSS style of any inputs that do not have valid values to highlight their location in the form. If a field has been filled out correctly, inputs must not have any error highlights applied. If any problems are detected during validation, prevent the browser from sending the data to the page defined in the form's action attribute by using preventDefault() If no problems are detected during validation, allow the browser to forward the user to the thank-you.html page.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning