The HTMLInputElement or HTMLTextAreaElement to modify.
The desired read-only state.
true
for read-onlyfalse
to allow input/editing.If the provided element is null
or undefined
.
MDN Documentation for the readonly attribute
// Get an input element by its GUID
const inputElement = ix.api.dom.getHtml("<ELEMENT-GUID>");
// Set the input element to read-only
ix.api.dom.setReadOnly(inputElement, true);
// Allow editing on the input element
ix.api.dom.setReadOnly(inputElement, false);
Modifies the read-only state of an input or textarea element.