What does the Input type="hidden" attribute do for HTML? Just need an example for clarification. Thank You
Printable View
What does the Input type="hidden" attribute do for HTML? Just need an example for clarification. Thank You
Allows you to pass data to a page without it being displayed to the user. Say you have a value you need to pass with the form but you don't want the user to see it. For example, a primary key for the record that is being displayed for updating. The user doesn't need to see this value, but the page that does the update will need it to know what record to effect. Using a hidden input field allows you to pass the value.
Another use is for passing values from ActiveX controls. They will not pass on their own. So onSubmit you have to put their values into hidden fields so the values get passed.