
252 | Guest Management ClearPass Guest 3.9 | Deployment Guide
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 Expiry drop-down list. One of the values in
this list is special: the -1 option displays the value Choose expiration time…
When this option is selected, the Expiration Time field is then displayed, 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.
Additional examples of the Visible If conditional expressions can be found in the guest_edit form.
Editing Views
A view 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, select the
view in the Customize Forms & Views list and click the Edit Fields link. This opens the Customize
View Fields editor.
View fields have a rank number, which specifies the relative ordering of the columns when displaying the
view. The Customize View Fields editor always shows the columns in order by rank.
The type of each field is displayed. This controls what kind of user interface element is used to display the
column, and whether the column is to be sortable or not. The title of the column and the width of the
Comentarios a estos manuales