Search.../

readOnly

Indicates if the dashboard number input element is read-only.

Description

By default, readOnly is set to false. This allows site visitors to edit the field.

If readOnly is set to true, then the input field appears greyed out on your site and visitors cannot modify it.

Type:

booleanRead & Write, default value is false

Was this helpful?

Check if the dashboard number input is read-only

Copy Code
1let isReadOnly = $w('#myElement').readOnly; // true
Set the dashboard number input to be read-only

Copy Code
1$w('#myElement').readOnly = true;