SQL PHP HTML ASP JavaScript articles and free scripts to download

Hidden HTML form field to pass data

Hidden fields are similar to text fields except one difference i.e, hidden fields are not actually shown to the user (i.e, they will be hidden from the user). User cann' type anything into the hidden field. This is mainly used to submit some information which cannot be edited by the user.

Some examples of hidden filed uses are: customer id, page id, visitor referrer etc. Sensitive information are not kept in hidden fields. The data stored in hidden fields can be collected by server side script like any other form filed data.

Hidden field can be created as :

<input type="hidden" name="<Name of the field>" value="<Default value of the object>">


Attributes of Hidden Field

Name:This attribute specifies the name of the object through which it can be referenced.
Value:Specifies the value of the hidden field.

Example:

<input type="hidden" name="hidfield" value="Cart ID ">

This places a hidden field within the HTML form, which can be referenced by using its name "hidfield" and whose value is "Cart ID ". Hidden field name and value are submitted to the server just as any other text field except that the field will not be visible to the user.

Note:

If the user sees the viewsource, then he/she can find the hidden field.
Please rate this Article on one to five scale

Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer