ui.Form.setElementHidden
Show or hide form elements.
Syntax
setElementHidden(
name STRING,
hidden INTEGER )
- name defines the name of the node, see Identifying elements in ui.Form methods.
- hidden the integer value to show or hide the element.
Usage
Change the visibility of a form element with the setElementHidden()
method.
TABLE
allow hiding form fields
/ columns with little impact on the layout.The setElementHidden()
method changes the hidden attribute of all form
elements identified by the name.
The value passed to hide/show the element can be 0, 1 or 2:
Do not disable or hide all fields of a dialog, otherwise the dialog execution stops: At least one field must be able to get the focus during a dialog execution.
Do not disable/hide the current field having the focus. When
disabling or when hiding the current field, the AFTER FIELD
block of the current
field and the BEFORE FIELD
block on the next field in the tabbing order will be
executed. In a multiple dialog, if the next field in the tabbing order is in another sub-dialog, the
AFTER INPUT
block of the current sub-dialog and the BEFORE
INPUT/CONSTRUCT/DISPLAY
or the next sub-dialog are executed. In all these control blocks, a
NEXT FIELD
to the field that is disabled or hidden will result in an endless
loop.