HIDDEN attribute
The HIDDEN attribute indicates if an element must be visible to the
user.
Syntax
{ HIDDEN[@screen-size]
| HIDDEN = USER
}
{ SMALL | MEDIUM | LARGE }HIDDENsets the underlying item attribute to 1, to hide the element.- screen-size is a screen size selector that indicates if the element must be
hidden, depending on the size of the screen. Several
HIDDEN@screen-sizeattributes can be used for the same element. - With
HIDDEN=USER, the underlying item attribute gets a value of 2, to hide the element by default, and let end-users show the element (typically for table columns). TheUSERoption cannot be mixed with screen-size selectors.
Usage
By default, all form elements are visible. Specify the HIDDEN attribute, to hide
a form element, such as a form field or a groupbox.
If the HIDDEN keyword is specified alone, the underlying item attribute is set
to 1. The value 1 indicates that the element is definitively hidden to the end user, which cannot
show the element, for example with the context menu of TABLE headers. In this hidden mode, the UNHIDABLE attribute is ignored by
the front-end.
With HIDDEN=USER, the underlying item attribute is set to 2. The value 2
indicates that the element is hidden by default, but the end user can show/hide the element as
needed, when the widget and its container provide a way to do so. For example, in a
TABLE or TREE container, the end user can use a context menu
option to show a column defined with HIDDEN=USER attribute. When
HIDDEN is used without the USER value, the column is definitively
invisible.
Form fields hidden with HIDDEN=USER (value 2) might be shown anyway, if the
field is needed by a dialog for input. In such case, the program dialog takes precedence over the
HIDDEN attribute.
The runtime system detects hidden form fields: If you write an INPUT block using a hidden field, the
field is ignored, as if it was declared as NOENTRY, or disabled with DIALOG.setFieldActive("fieldname", FALSE).
The visibility of form elements can be changed by program with the ui.Form.setElementHidden() or
ui.Form.setFieldHidden()
methods.
When using one of the @screen-size modifiers, the
HIDDEN attribute is only applied when the size of the screen or web browser window
matches. This can be used to implement responsive layout.
When using HIDDEN@screen-size, make sure that the element does not contain a
field (or is not a form field) that will be used for user input: The current input field having the
focus must always be visible.
Example
EDIT f01 = FORMONLY.cust_id, HIDDEN;
EDIT f02 = FORMONLY.cust_name;
EDIT f03 = FORMONLY.cust_address, HIDDEN=USER;
EDIT f04 = FORMONLY.cust_comment, HIDDEN@SMALL, HIDDEN@MEDIUM;