HTML Forms :
HIDDEN FIELD








Hidden fields are similar to text fields, with one very important difference!

The difference is that the hidden field does not show on the page. Therefore the visitor can't type anything into a hidden field, which leads to the purpose of the field:

To submit information that is not entered by the visitor.




SETTINGS:

Below is a listing of valid settings for hidden fields:


HTMLEXPLANATIONEXAMPLE
hidden
name=
value=

Hidden field
Name of the field.
Value of the field.




The name setting adds an internal name to the field so the program that handles the form can identify the fields.

The value setting defines what will be sent once the form is submitted.





AN EXAMPLE:

Look at this HTML example:
<html>
<head>
<title>My Page</title>
</head>
<body>
<form name="myform" action="http://www.mydomain.com/myformhandler.cgi" method="POST">
<div align="center">
<input type="text" size="25" value="Enter your name here!">
<input type="hidden" name="Language" value="English">
<br><br>
</div>
</form>
</body>
</html>


And the resulting output from it:




The hidden field does not show, but still, when the form is submitted the hidden field is sent with it.

In this example the hidden field would tell the program that handles the form, that the users preferred language is English.

 << PREVIOUS
READ MORE >>  
















DEVELOPER TIP!





     "Better Than Books - As Easy As It Gets!"