TX Text Control .NET Server

Javascript: TXTextControl.TextFieldType Enumeration

Enumeration|Introduced in 32.0

Description

Possible types of text fields.

Members

MemberDescription
ApplicationFieldThe field type is ApplicationField.
CheckFormFieldThe field type is CheckFormField.
DateFormFieldThe field type is DateFormField.
FormFieldsAll FormField types.
PageNumberFieldThe field type is PageNumberField.
SelectionFormFieldThe field type is SelelctionFormField.
TextFormFieldThe field type is TextFormField.
TextFieldThe field type is TextField.
AllAll types of text fields.

Examples

The following example uses TXTextControl.TextFieldType.ApplicationField (the field type is ApplicationField.) in a document-editing workflow.

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

TXTextControl.textParts.getMainText(function(formattedText) {
    formattedText.getTextFieldsByType(
        TXTextControl.TextFieldType.ApplicationField,
        function(textFields) {
            if (!textFields) {
                console.warn("No text field info was returned.");
                return;
            }
            
            console.log("get text fields by type result:", textFields);
        },
        onTxError
    );
}, onTxError);