# Javascript: TXTextControl.addTextField Method

> Obsolete. This method will be removed in one of the next versions. Inserts a new ApplicationField or TextField at the current input position.

> **Note:** This is deprecated and should not be used in new work.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 25.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.addTextField Method
- **267 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/addtextfield-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/addtextfield-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/addtextfield-method/llms-full.txt

---

### Description

`Obsolete. This method will be removed in one of the next versions.` Inserts a new ApplicationField or TextField at the current input position.

### Syntax

```javascript
<void> TXTextControl.addTextField(<TextField> textField)
```

### Parameters

| Parameter | Description |
|---|---|
| textField | The text field. Allowed types are [TextField](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-textfield/llms-full.txt) and [ApplicationField](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-applicationfield/llms-full.txt). |

### Examples

The following example demonstrates `TXTextControl.addTextField` in a practical document-editing workflow. Obsolete. This method will be removed in one of the next versions. Inserts a new ApplicationField or TextField at the current input position.

```javascript
function addTextField(textField) {
    TXTextControl.addTextField(textField);
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.AddResult Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/addresult-enumeration/llms-full.txt)
- **Next:** [Javascript: TXTextControl.append Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/append-method/llms-full.txt)
