Saturday, 23 June 2012

How to add Hidden Element in a Form

You can have something called a Hidden Element on your form. Hidden elements are for your benefit, not your users. You can store information in a hidden element, and then pass the information to a second web page or form.

The Code for a hidden element is this:

<INPUT TYPE="Hidden" NAME="H1" VALUE="Some value">

As the name of the element implies, any data stored in the VALUE attribute does not show up on the page. However, if a viewer clicks View > Source in a browser, your code can be seen, and that includes any values you've hard-coded into the Value attribute of the Hidden element. So you wouldn't use the Hidden element to store sensitive data.

No comments:

Post a Comment