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.HTML Code:
<input type="hidden" />
Hidden Fields:
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.HTML Code:
<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" />
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.
0 comments:
Post a Comment