Hidden Input Builder
In this topic ...
Related Topics ...
The Hidden Input adds an <input type=hidden> element to one or more pages in the model. We can use the Hidden Input builder to pass data during a form submission that the user does not specify such as the current time, or any other information that we need, but don't want the user to specify.
Quick Tips
- Use an indirect reference to pass a value from the model as a hidden input -- We can pass the value of a variable or a value returned by a Method or Service Call by specifying its name in the Reference Chooser.
- Use Java code to pass the current date or other computed value -- You can pass a value computed from Java code with the following syntax:
${Java/webAppAccess.getHttpServletRequest().getLocale()} -- Passes the locale of the user to the action processing the form.
Specifying Inputs
The Hidden Input builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."
Input name Description Name Enter a name for this builder call. The designer tool displays this name in the builder call list. Page Location Use the Page Location input to specify the page or pages on which this builder call will act. See "Locating Control Builders on Pages" for detailed documentation about the Page Location input and page location syntax.
Value Specify a value to be passed when the form is submitted. We can enter an indirect reference using the Reference Chooser, enter Java code to compute a value, or enter text to pass a constant value. For example, To pass the value of a variable:
${Variables/UserName}
To pass the current date:
${Java/java.text.DateFormat.getDateInstance().format(new java.util.Date())}
To pass a constant value:
SomeValue
Also Display Value Enable to display value as text.