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.
HTML hidden input box and its attributes name and value with examples

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 with value ( hidden data ).
HTML Form Text Input field Password input field Textarea multi line input

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Md Anisur Rahman

    01-02-2019

    Your information is helpful for me.

    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer