JavaScript

{dialog.object}setDisabled Method

Syntax

{dialog.object}.setDisabled(UXControlName [, flag]);

Arguments

UXControlName

The control to enable or disable. Can be a single control specified as a string or an array of controls.

flag

Optional true/false value. Default value is true. If true, control will be disabled. If false, control will be enabled.

Description

Set the state of a control to either enabled or disabled.

Discussion

The optional flag argument controls whether the state is set to disabled or enabled. You can optionally pass in an array of controls to set.

Example

//Disable the 'FIRSTNAME' field.
{dialog.object}.setDisabled('FIRSTNAME');

//Enable multiple controls
{dialog.object}.setDisabled(['BTN1','FIRSTNAME','LASTNAME],false);