User's Manual

232 | Configuration Dell Networking W-ClearPass Guest 6.4 | User Guide
In this case, the Conversion function is set to NwaConvertOptionalDateTime to convert the string time
representation from the form field (for example, 2008-01-01) to UNIX time (for example, 1199145600).
The Validator for the expire_time field is IsValidFutureTimestamp, which checks an integer argument
against the current time.
The Value Formatter is applied after validation. This may be used in situations where the validator requires the
specific type of data supplied on the form, but the stored value should be of a different type. In the expire_
time field example, this is not required, and so the value formatter is not used. However, if the Conversion
function had not been used, and the Validator had been set to IsValidFutureDateTime (which checks a string
date/time value), then the Value Formatter would need to be set to NwaConvertOptionalDateTime to perform
the data conversion before the form processing.
A comparison of these two approaches is shown below to illustrate the difference:
When using a Conversion or Value Format function, you will almost always have to set up a Display Function
for the form field. This function is used to perform the conversion in the reverse direction – between the
internal stored value and the value displayed in the form field.
See "Form Field Conversion Functions" on page 521 for a detailed list of the options available to you for the
Conversion and Value Format functions.
The Display Param is the name of a form field, the value of which will be passed to the Display Function. In
almost all cases this option should contain the name of the form field.
Display Arguments are available for use with a form field and are used to control the conversion process. In the
case of the expire_time form field, the Display Function is set to NwaDateFormat to perform a conversion
from a UNIX time to a date/time string, and the Display Argument specifies the format to use for the
conversion.
See "Form Field Display Formatting Functions" on page 522 for a detailed list of the options available to you for
the Display Function and Static Display Function.
The Enable If and Visible If options in the form field editor allow you to specify JavaScript expressions. The
result obtained by evaluating these expressions is used to enable/disable, or show/hide the form field in real
time, while an operator is using the form.