English
German

HTML Hidden Fields

HTML Hidden Field

Hidden fields are not displayed by the browser, there are a number of uses for them. When dealing with forms you will usually find yourself using some sort of database mechanism: MySQL, SQL Server, or maybe justa plain text file. In any case use hidden forms to pass along information to your database that may have already been received from the user. In this rare case, a hidden form field may come in handy.

Example:

<input type="hidden" />
 

There is no display of your hidden field in the box because the browser is told to hide them from view. Our field above is incomplete and pretty much useless as it is. Adding a name and a value attribute will change this.


HTML Name and Value the Fields

Naming your fields can be accomplished in two different ways discussed previously. Use the id or name attribute to specify a name for your hidden field.

Example:

<input type="hidden" id="age" name="age" value="23" />
<input type="hidden" id="DOB" name="DOB" value="01/01/70" />
<input type="hidden" id="admin" name="admin" value="1" />
 

Above we have demonstrated 3 possible hidden fields that you may want to pass along some form at some point, especially if you have any kind of user base where returning users must log in. The admin field could be used to check some sort of user level entry of a returning user; 1 being administrator and 0 being non-administrator access.

Use hidden fields when you have variables you want to pass from one form to another without forcing the user to re-type information over and over again.


HTML Tutorial,HTML Hidden Fields, HTML Hidden Fields example, learn HTML Hidden Fields,explain example HTML Hidden Fields online free training HTML Tutorial, HTML Tutorial example, learn HTML Hidden Fields, online tutorial, download tutorial, HTML Tutorial books, HTML Tutorial videos, live videos HTML Tutorial, learn HTML Tutorial, HTML Tutorial topic HTML Hidden Fields, live training HTML Tutorial, download free tutorial