TX Text Control .NET Server

Javascript: CheckFormField.getChecked Method

Method|Introduced in 28.0

Description

Gets a value indicating whether the checkbox is in the checked state.

Syntax

<void> CheckFormField.getChecked(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives a value indicating whether the checkbox is in the checked state.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates CheckFormField.getChecked in a practical document-editing workflow. It gets a value indicating whether the checkbox is in the checked state.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectChecked(checkFormField) {
    checkFormField.getChecked(
        function(result) {
            if (result) {
                console.log("get checked is available.");
            } else {
                console.warn("get checked is not available in the current document state.");
            }
        },
        onTxError
    );
}