# FormField.Enabled Property

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > FormField.Enabled Property
- **674 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/enabled-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/enabled-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/enabled-property/llms-full.txt

---

### Description

Gets or set a value indicating whether the form field is enabled. This property has only an effect, when the when the [TextControl.EditMode](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/editmode-property/llms-full.txt) is set to `ReadAndSelect` and the [DocumentPermissions.AllowEditingFormFields](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentpermissions/alloweditingformfields-property/llms-full.txt) 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](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textfieldclicked-event/llms-full.txt) and [TextFieldDoubleClicked](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textfielddoubleclicked-event/llms-full.txt) of the Formfield are suppressed. The default value of this property is true.

### Syntax

```csharp
public bool Enabled { get; set; }
```

```vbnet
Public Property Enabled As Boolean
```

### Examples

The following example retrieves the form field at the current input position and inspects it by using `FormField.Enabled`.

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

formField.Enabled = true;
if (formField.Enabled)
{
    Console.WriteLine("Form Field: Enabled is enabled.");
}
```

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

formField.Enabled = True
If formField.Enabled Then
    Console.WriteLine("Form Field: Enabled is enabled.")
End If
```

---

## Nearby

- **Previous:** [FormField.DescriptiveText Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/descriptivetext-property/llms-full.txt)
- **Next:** [FormField.FormFieldDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/formfielddialog-method/llms-full.txt)
