Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

apex:inputHidden

An HTML input element of type hidden, that is, an input element that is invisible to the user. Use this component to pass variables from page to page.

Use this component to get user input for a controller method that does not correspond to a field on an sObject. Only <apex:inputField> and <apex:outputField> can be used with sObject fields.

This component supports HTML pass-through attributes using the "html-" prefix. Pass-through attributes are attached to the generated <input> tag.

Example

1<apex:inputHidden value="{!inputValue}" id="theHiddenInput"/>

The example renders the following HTML:

1<input id="theHiddenInput" type="hidden" name="theHiddenInput" />

Attributes

Attribute Name Attribute Type Description Required? API Version Access
id String An identifier that allows the inputHidden component to be referenced by other components in the page. 10.0 global
immediate Boolean A Boolean value that specifies whether the action associated with this component should happen immediately, without processing any validation rules associated with the fields on the page. If set to true, the action happens immediately and validation rules are skipped. If not specified, this value defaults to false. See Use the immediate Attribute Carefully. 11.0 global
rendered Boolean A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. 10.0 global
required Boolean A Boolean value that specifies whether this inputHidden field is a required field. If set to true, the a value must be specified for this field. If not selected, this value defaults to false. 10.0 global
value Object A merge field that references the controller class variable that is associated with this hidden input field. For example, if the name of the associated variable in the controller class is myHiddenVariable, use value="{!myHiddenVariable}" to reference the variable. 10.0 global