Question: We need to submit at least one regular old HTML form to a web server. The programming assignment is to validate an HTML form before

We need to submit at least one regular old HTML form to a web server. The programming assignment is to validate an HTML form before the form information is submitted. The form should be submitted only if all information is complete. You should read the following directions carefully.

The form you will use is given in the following link: parentalConsent. Click this link then save the page to your hard drive. You will need to modify this file's form tag and add a submit button. You will also need to modify the file to make the validation work. The form looks like this.

You are to ensure that all information is present before allowing the form to be submitted. The destination textbox and the parent's phone and name textboxes must have something in them. The Month and Day select lists must have something selected bysides the default values of "Month" and "Day", and he group of radio buttons must have 1 of the radio buttons selected. You do not have to validate the Year select element.

Each of the select elements has the first option selected by default. So as a hint you can check to see if the value property is something other than the default; if so, the user has selected a real value for the month and day.

If any information is missing, cancel the submission and inform the user that they need to fill out the form completely. Once all information is present, when the user clicks the button, the form will be submitted to the web server given below.

You will need to modify the form tag to include the following attributes: method="post" and action="http://mcprather.pythonanywhere.com/formhandler"

The above link will sent your from to a page on the server that will then display what form name=value pairs were sent to the server. The formhandler should display 7 reasonable name-value pairs (destination, month, day, year, phone, name, and permission).

You may use whatever method you want to validate any and all form elements, including using the HTML5 required attribute.

Examples of how to submit a form, how to validate various HTML form elements, and a video on form validation are given in the material for HTML Forms lecture materials.

parentconsent link info is below.

Field Trip Consent Form

Field Trip Consent Form

Description of Trip

Destination

Date of Trip

Parental Information

Parents's Phone

Parents's Name

Permission is Granted Permission is NOT Granted



Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!