Working with Hidden Fields

Unlike the other fields you've created, the e-mail field has a predefined value (the e-mail of who will receive the information), which contest participants should not be able to change. In fact, the e-mail address should not even be seen. To accomplish this you will use the hidden field property to prevent participants from seeing the address.

You create a hidden field using <INPUT> tag with the TYPE property set to HIDDEN. They syntax for this tag is:

<INPUT TYPE=HIDDEN NAME=text VALUE=value>

You will use the fictitious e-mail address of "adavis@devilish.com" Because the field is hidden, you can place it anywhere between the opening and closing <FORM> tags. A standard practice is to place all hidden fields in one location, usually at the beginning of the form, to make it easier to interpret you HTML code. You should also include a comment describing the purpose of the field.

Return to the contestform.html file in your text editor. Directly below the <FORM> tag, insert the following two lines:

<!--- e-mail address of the person handling this form --->
<INPUT TYPE=HIDDEN NAME=EMAIL VALUE="adavis@devilish">

Save the changes to the file.