# TextFormField Class

> An object of the TextFormField class represents a text input field on a form. It can be initially empty and it can have a horizontal extension, when it is empty.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.TextField` › `TXTextControl.FormField`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextFormField Class
- **733 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textformfield/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textformfield/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textformfield/llms-full.txt

---

### Description

An object of the TextFormField class represents a text input field on a form. It can be initially empty and it can have a horizontal extension, when it is empty.

### Syntax

```csharp
public class TextFormField : FormField
```

```vbnet
Public Class TextFormField
    Inherits FormField
```

### Examples

The following example adds a customer-name input field to a form.

```csharp
TextFormField textFormField = new(20) { Name = "CustomerName" };
textControl.FormFields.Add(textFormField);
```

```vbnet
Dim textFormField As New TextFormField(20) With { .Name = "CustomerName" }
textControl.FormFields.Add(textFormField)
```

---

## In This Section

- [TextFormField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textformfield/constructor/llms-full.txt): Initializes a new instance of the TextFormField class.
- [TextFormField.EmptyWidth Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textformfield/emptywidth-property/llms-full.txt): Gets or sets the horizontal extension, in twips, of the form field, when it is empty.

---

## Nearby

- **Previous:** [TextFieldType Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textfieldtype/enumeration/llms-full.txt)
- **Next:** [TextFormField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textformfield/constructor/llms-full.txt)
