# FormText Constructor

> Initializes a new instance of the FormText class.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 15.0
- **Namespace:** `TXTextControl.DocumentServer.Fields`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXDocumentServer.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DocumentServer.Fields > FormText Constructor
- **473 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-fields/formtext/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-fields/formtext/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-fields/formtext/constructor/llms-full.txt

---

### Description

Initializes a new instance of the FormText class.

### Syntax

#### FormText()

Initializes a complete new instance of the FormText class without a connection to an existing ApplicationField.

```csharp
public FormText();
```

```vbnet
Public Sub New()
```

#### FormText(ApplicationField)

Initializes a new instance of the FormText class with a connection to an existing ApplicationField.

```csharp
public FormText(ApplicationField appField);
```

```vbnet
Public Sub New(appField As ApplicationField)
```

| Parameter | Description |
|---|---|
| appField | Specifies the ApplicationField to be adapted. |

### Examples

The following example creates a Form Text instance and configures its max length setting for a document workflow.

```csharp
TXTextControl.DocumentServer.Fields.FormText formText = new();
formText.MaxLength = 1;
```

```vbnet
Dim formText As New TXTextControl.DocumentServer.Fields.FormText()
formText.MaxLength = 1
```

---

## Nearby

- **Previous:** [FormText Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-fields/formtext/llms-full.txt)
- **Next:** [FormText.Format Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-fields/formtext/format-property/llms-full.txt)
