# FormField Class

> The FormField class is the base class of all form fields.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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`
- **Derived:** `TXTextControl.CheckFormField`, `TXTextControl.DateFormField`, `TXTextControl.SelectionFormField`, `TXTextControl.TextFormField`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > FormField Class
- **2122 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/llms-full.txt

---

### Description

The FormField class is the base class of all form fields.

### Syntax

```csharp
public class FormField : TextField
```

```vbnet
Public Class FormField
    Inherits TextField
```

### Examples

The following example retrieves the form field at the current input position and inspects it.

```csharp
CheckFormField field = new(false) { Name = "AcceptTerms" };
textControl.FormFields.Add(field);
FormField formField = textControl.FormFields.GetItem();
```

```vbnet
Dim field As New CheckFormField(False) With { .Name = "AcceptTerms" }
textControl.FormFields.Add(field)
Dim formField As FormField = textControl.FormFields.GetItem()
```

---

## In This Section

- [FormField.DescriptiveText Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/descriptivetext-property/llms-full.txt): Gets or sets a descriptive text for a form field. An empty string indicates that the form field has no such text. An empty string can also be used to delete a previously set text.
- [FormField.Enabled Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/enabled-property/llms-full.txt): Gets or set a value indicating whether the form field is enabled. This property has only an effect, when the when the TextControl.EditMode is set to ReadAndSelect and the DocumentPermissions.AllowEditingFormFields property has been set to true. In this case a Formfield can only be edited, when its Enabled property is true. When a FormField is disabled, the TextFieldClicked and TextFieldDoubleClicked of the Formfield are suppressed. The default value of this property is true.
- [FormField.FormFieldDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/formfielddialog-method/llms-full.txt): Opens a dialog box to alter the formatting attributes of the form field.

---

## Nearby

- **Previous:** [FormattingStyleCollection.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstylecollection/syncroot-property/llms-full.txt)
- **Next:** [FormField.DescriptiveText Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/descriptivetext-property/llms-full.txt)
