eligius
    Preparing search index...

    Variable toggleFormElementConst

    toggleFormElement: TOperation<
        IToggleFormElementOperationData,
        Omit<IToggleFormElementOperationData, "enabled">,
    > = ...

    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.

    // Disable an input field
    toggleFormElement({selectedElement: $input, enabled: false});
    // Input is now disabled
    // Enable a previously disabled button
    toggleFormElement({selectedElement: $button, enabled: true});
    // Button is now enabled