FormControl.enabled Method

Determines whether the object is enabled or disabled.

Syntax

public boolean enabled([boolean value])

Run On

Client

Parameters

  • value
    Type: boolean
    A Boolean value that specifies whether the control is enabled; optional.

Return Value

Type: boolean
true if the object is enabled; otherwise, false.

Remarks

The enabled property lets you enable or disable controls at run time. For example, you can disable objects that do not apply to the current state of the application. You can also disable a control that is used only for display purposes, such as an error message that provides read-only information.

Examples

The following example shows how to return and set the enabled property for a control.

// Return the value of the enabled property. 
info(strfmt("enabled: %1",this.enabled())); 
// Set the enabled property. 
this.enabled(false);

See Also

FormControl Class

FormControl.enabled Method

FormControl.skip Method