Javascript: TXTextControl.TextFieldType Enumeration
Description
Possible types of text fields.
Members
| Member | Description |
|---|---|
| ApplicationField | The field type is ApplicationField. |
| CheckFormField | The field type is CheckFormField. |
| DateFormField | The field type is DateFormField. |
| FormFields | All FormField types. |
| HypertextLink | The field type is HypertextLink. |
| DocumentLink | The field type is Documentlink. |
| PageNumberField | The field type is PageNumberField. |
| SelectionFormField | The field type is SelelctionFormField. |
| TextFormField | The field type is TextFormField. |
| TextField | The field type is TextField. |
| All | All 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);