Search.../

readOnly

Indicates if the dashboard 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 a dashboard input is read-only

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

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