DHTMLX Docs & Samples Explorer

setReadonly (name, state)

Makes item readonly.

Parameters:

  • name - the id of item (the item's parameter 'name')
  • state - (boolean) if the parameter is set to true - an item will be readonly. false makes an item not readonly.
    Default value - false
//makes an item with name='myInput' readonly
   myForm.setReadonly('myInput', true);
//makes the item not readonly
   myForm.setReadonly('myInput', false);

See also: