Search...
enabled
Indicates if the mobile element is enabled or disabled.
Description
If enabled
is true
, users can interact with the mobile element.
If enabled
is false
, users cannot interact with the mobile element.
When an element is disabled:
- Its color is faded or grayed out.
- Actions that the element has been configured to perform, such as opening a link, do not occur.
- Event handlers that have been bound to the element, such as with
onPressIn
, do not run. - If the element is an input element, such as a text box, users cannot interact with it.
To set the enabled
property of a mobile element, use the element's
enable()
or disable()
functions.
The enabled
property can also be set in the Editor using the Properties and Events panel.
Type:
booleanRead Only
Mixed in from:$w.MobileDisabledMixin
Related Content:
Was this helpful?
Get a mobile element's enabled status
Copy Code
1let isEnabled = $w("#myMobileElement").enabled; // true
Toggle a mobile element's enabled state
Copy Code
1if( $w("#myMobileElement").enabled ) {2 $w("#myMobileElement").disable();3}4else {5 $w("#myMobileElement").enable();6}