(1) Link labels to inputs in the HTML file using the "for" and "id" attributes in the existing code. Correct any HTML code that has not been done this way.
(2) Use Vanilla or pure JavaScript (no JQuery, etc) to finish the modal form:
- The form data should be validated when the user clicks 'Submit'
- Data must be entered correctly:
(1) First name field has a minimum of 2 characters / is not empty.
(2) Last name field has a minimum of 2 characters / is not empty.
(3) Email is valid.
(4) For number of competitions, a number value is entered.
(5) One radio button is selected.
(6) The terms and conditions checkbox is checked, the other checkbox is optional/can be left unchecked.
- Retain form inputs (don't clear the form) when it doesn't pass validation.
(1) Link labels to inputs in the HTML file using the "for" and "id" attributes in the existing code. Correct any HTML code that has not been done this way.
(2) Use Vanilla or pure JavaScript (no JQuery, etc) to finish the modal form:
(1) First name field has a minimum of 2 characters / is not empty.
(2) Last name field has a minimum of 2 characters / is not empty.
(3) Email is valid.
(4) For number of competitions, a number value is entered.
(5) One radio button is selected.
(6) The terms and conditions checkbox is checked, the other checkbox is optional/can be left unchecked.