# Javascript: TXTextControl.TextFieldType Enumeration

> Possible types of text fields.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 32.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.TextFieldType Enumeration
- **555 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/textfieldtype-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/textfieldtype-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/textfieldtype-enumeration/llms-full.txt

---

### 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.

```javascript
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);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.textFieldsEditable Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/textfieldseditable-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.TextFrameInsertionMode Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/textframeinsertionmode-enumeration/llms-full.txt)
