TX Text Control .NET Server

CheckFormField Object

Object|Introduced in 28.0

Description

The CheckFormField object represents a checkbox in a document. The checkbox can be checked or unchecked through the end-user.

Syntax

CheckFormField

Examples

The following example demonstrates CheckFormField in a practical document-editing workflow. The CheckFormField object represents a checkbox in a document. The checkbox can be checked or unchecked through the end-user.

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

function inspectCheckFormField(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
    );
}

Members

Methods

MethodDescription
getCheckedGets a value indicating whether the checkbox is in the checked state.
getCheckedCharacterGets the character which is used to display the checkbox in the checked state.
getDescriptiveTextGets the form field's descriptive text. An empty string indicates that the link has no such text. (Inherited from FormField.)
getEnabledGets a value indicating whether the form field is enabled. (Inherited from FormField.)
getUncheckedCharacterGets the character which is used to display the checkbox in the unchecked state.
setCheckedSets a value indicating whether the checkbox is in the checked state.
setCheckedCharacterSets the character which is used to display the checkbox in the checked state.
setDescriptiveTextSets the form field's descriptive text. An empty string or null can be used to delete a previously set text. (Inherited from FormField.)
setEnabledSets a value indicating whether the form field is enabled. This property has only an effect, when the when the edit mode is set to TXTextControl.EditMode.ReadAndSelect and the allowEditingFormFields property of the document permissions has been set to true. In this case a Formfield can only be edited, when its Enabled property is true. When a FormField is disabled, the TextFieldClicked and TextFieldDoubleClicked of the Formfield are suppressed. The default value of this property is true. (Inherited from FormField.)
setUncheckedCharacterSets the character which is used to display the checkbox in the unchecked state.