rbf_showOrHideField()
Purpose
This function shows or hides a field and its label. It will have no effect if
the field is not shown on the page. On view pages, this API can be used in the
page’s onLoad script; on edit pages, it can be used in any event
handling code.
Syntax
rbf_showOrHideField(fieldName, showField,
doNotHideResponsiveColumn)
Parameters
fieldName
The integration name of the field
showField
If true, show the field and its label. If
false, hide the field and its
label.
doNotHideResponsiveColumn
Optional. If true, Platform hides only the
value of the field, not the column itself. The column for the hidden field
maintains its position regardless of the screen size. If false, Platform hides both the value of the
field and its column. The value in the next column will take its position.
Defaults to false.
Note: This API is supported in portals as well.
Examples
The following examples show the behavior resulting from different options for
showOrHideField(). In these examples, the view page is
configured for four columns. The field to show or hide is
Status (with the integration name
t_status):
- Result of
showOrHideField("t_status", true):
- Result of
showOrHideField("t_status", false, true). The field's position is maintained in the row:
- Result of
showOrHideField("t_status", false, false). The other fields in the row shift left, while the following rows remain the same:
- Result of
showOrHideField("t_status", true)on a narrower screen, where the four columns have collapsed to two columns:
- Result of
showOrHideField("t_status", false, false)with two columns. The other field in the row, Tags, shifts left, while the following rows remain the same: