eligius
    Preparing search index...

    Variable setFormValueConst

    setFormValue: TOperation<
        ISetFormValueOperationData,
        Omit<ISetFormValueOperationData, "value">,
    > = ...

    Sets the value of an input, select, or textarea element.

    Handles different input types appropriately:

    • Text inputs, textareas, selects: sets value directly
    • Checkboxes: sets checked property for boolean values
    • Radio buttons: sets checked property for boolean values
    • Number inputs: converts to string
    // Set text input value
    const result = setFormValue({selectedElement: $input, value: 'test@example.com'});
    // Element value is now 'test@example.com'
    // Set checkbox checked state
    const result = setFormValue({selectedElement: $checkbox, value: true});
    // Checkbox is now checked