---
schema_version: "1"
id: d8bf45dbd36dd753cfc4b4e2570853f79863881da727a621e082dccb800655b9
title: apex:inputHidden
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/components/pages-compref-inputhidden.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-inputhidden.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 67a969ebf66e1ff2efff4fc2399c4ecd26ab0918f5d91089443a1b329e8d8e80
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# 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](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_html_features_pass_through_attributes.htm) using the "html-" prefix. Pass-through attributes are attached to the generated `<input>` tag.

## Example

```apex
<apex:inputHidden value="{!inputValue}" id="theHiddenInput"/>
```

The example renders the following HTML:

```html
<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](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/best-practices/best-practices-performance/pages-best-practices-perf-immediate-attr.md). |           | 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 |

**See Also**

- [apex:input](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-input.md)
- [Using Input Components in a Page](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/quick-start/pages-quick-start-input-components.md)
