# Javascript: TXTextControl.TextField Constructor

> Initializes a new instance of the TextField class.

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

---

### Description

Initializes a new instance of the TextField class.

### Syntax

```javascript
TXTextControl.TextField([<string> text])
```

### Parameters

| Parameter | Description |
|---|---|
| text | Optional. Specifies the visible text of the field. The default value is "«MERGEFIELD»". |

### Examples

The following example demonstrates `TXTextControl.TextField` in a practical document-editing workflow. Initializes a new instance of the TextField class.

```javascript
const textField = TXTextControl.TextField("Quarterly report");
console.log("Created TXTextControl.TextField value:", textField);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.TextField.bounds Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-textfield/bounds-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.TextField.containsInputPosition Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-textfield/containsinputposition-property/llms-full.txt)
