User's Manual

Unlike the other parts of the form field editor, the Enable If and Visible If expressions are evaluated by the
operator’s Web browser. These expressions are not used by the server for any other purpose.
The expression must be a Boolean expression in the JavaScript language; statements and other code should
not be included as this will cause a syntax error when the form is displayed in a Web browser.
Because of the scoping rules of JavaScript, all of the user interface elements that make up the form are
available as variables in the local scope with the same name as the form field. Thus, to access the current value
of a text field named sample_field in a JavaScript expression, you would use the code sample_field.value.
Most user interface elements support the value property to retrieve the current value. For check boxes,
however, use the checked property to determine if the check box is currently selected.
The most practical use for this capability is to hide a form field until a certain value of some other related field
has been selected.
For example, the default create_user form has an Account Expiration drop-down list. One of the values in
this list is special: the -1 option displays the value Account expires at a specified time…
When this option is selected, the form expands to include the Expires After row, allowing the user to specify a
time other than one of the options in the list.
The expire_time field uses the JavaScript expression expire_after.value < 0 for the Visible If option. When
the -1 option has been selected, this condition will become true and the field will be displayed.
If the expire_timezone field is used in conjunction with expire_time and a time zone and date are selected,
the date calculation is adjusted relative to the time zone.
Additional examples of the Visible If conditional expressions can be found in the guest_edit form.
Editing Views
A view is a page in the application that displays data, similar to a form, but does not contain interactive fields
the user can modify. It consists of one or more columns, each of which contains a single field. You can change
which fields are displayed and how each field is displayed. You can also define your own fields using the
Customize Fields page, and then add them to a view by choosing appropriate display options for each new
column.
To add a new field to a view, reorder the fields, or make changes to an existing field in a view, go to
Configuration > Pages >Forms & Views, click the view, and click its Edit Fields link. The Customize View
Fields editor opens.
Dell Networking W-ClearPass Guest 6.4 | User Guide Configuration | 233