• Modifies the disabled state of a form element.

    Parameters

    • element: HTMLInputElement | HTMLButtonElement | HTMLSelectElement | HTMLTextAreaElement | HTMLOptGroupElement | HTMLOptionElement | HTMLFieldSetElement

      The form element to modify.

      • Must be an instance of HTMLElement that supports the disabled attribute (e.g., button, input, select, textarea, optgroup, option, fieldset).
    • disabled: boolean

      The desired disabled state.

      • Set to true to disable the element
      • Set to false to enable it

    Returns void

    Throws

    If the provided element is null, undefined, or does not support the disabled attribute.

    See

    MDN Documentation for HTMLInputElement.disabled

    Example

    // Get a element by its GUID
    const element = ix.api.dom.getHtml("<ELEMENT-GUID>");

    // Disable the element
    ix.api.dom.setDisabled(element, true);

    // Enable the element
    ix.api.dom.setDisabled(element, false);