Const
Enables or disables form input elements (inputs, selects, textareas, buttons).
Sets the disabled property on the element. When enabled is true, removes the disabled attribute; when false, adds the disabled attribute.
disabled
enabled
// Disable an input fieldtoggleFormElement({selectedElement: $input, enabled: false});// Input is now disabled Copy
// Disable an input fieldtoggleFormElement({selectedElement: $input, enabled: false});// Input is now disabled
// Enable a previously disabled buttontoggleFormElement({selectedElement: $button, enabled: true});// Button is now enabled Copy
// Enable a previously disabled buttontoggleFormElement({selectedElement: $button, enabled: true});// Button is now enabled
Enables or disables form input elements (inputs, selects, textareas, buttons).
Sets the
disabledproperty on the element. Whenenabledis true, removes the disabled attribute; when false, adds the disabled attribute.