# TXTextControl.ApplicationField Object

> Represents a ApplicationField. Is used as the callback function argument for the getTextFields method and as a parameter for the addTextField method, for example.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 25.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > TXTextControl.ApplicationField Object
- **1893 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/llms-full.txt

---

### Description

Represents a ApplicationField. Is used as the callback function argument for the [getTextFields](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/gettextfields-method/llms-full.txt) method and as a parameter for the [addTextField](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/addtextfield-method/llms-full.txt) method, for example.

### Syntax

```javascript
TXTextControl.ApplicationField
```

### Examples

The following example demonstrates `TXTextControl.ApplicationField` in a practical document-editing workflow. It represents a ApplicationField. Is used as the callback function argument for the getTextFields method and as a parameter for the addTextField method, for example.

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

TXTextControl.textParts.getMainText(function(mainText) {
    const applicationFields = mainText.applicationFields;
    applicationFields.getItem(function(applicationField) {
        if (!applicationField) {
            console.warn("No application field is available at the current input position.");
            return;
        }
    
        applicationField.getFormat(
            function(result) {
                console.log("get format result:", result);
            },
            onTxError
        );
    }, onTxError);
}, onTxError);
```

---

## In This Section

- [Javascript: TXTextControl.ApplicationField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/constructor/llms-full.txt): Initializes a new instance of the ApplicationField class.
- [Javascript: TXTextControl.ApplicationField.parameters Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/parameters-property/llms-full.txt): The ApplicationField's parameters.
- [Javascript: TXTextControl.ApplicationField.showDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/showdialog-method/llms-full.txt): Displays a merge field dialog for certain merge field types.
- [Javascript: TXTextControl.ApplicationField.typeName Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/typename-property/llms-full.txt): The merge field type ("MERGEFIELD", "DATE", "IF" etc.).

---

## Nearby

- **Previous:** [Javascript: TXTextControl.AppendSettings Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/appendsettings-enumeration/llms-full.txt)
- **Next:** [Javascript: TXTextControl.ApplicationField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-applicationfield/constructor/llms-full.txt)
