# IFormattedText.FormFields Property

> Gets a collection of all form fields in the text part. The property's value is an object of the type FormFieldCollection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **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
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > IFormattedText.FormFields Property
- **452 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/formfields-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/formfields-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/formfields-property/llms-full.txt

---

### Description

Gets a collection of all form fields in the text part. The property's value is an object of the type [FormFieldCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfieldcollection/llms-full.txt).

### Syntax

```csharp
FormFieldCollection FormFields { get; }
```

```vbnet
ReadOnly Property FormFields As FormFieldCollection
```

### Examples

The following example applies bold formatting through the iformatted text's selection by using `IFormattedText.FormFields`.

```csharp
Selection formattedSelection = iFormattedText.Selection;
formattedSelection.Bold = true;
iFormattedText.Selection = formattedSelection;

foreach (FormField formField in iFormattedText.FormFields)
{
    formField.DescriptiveText = "Quarterly results";
}
```

```vbnet
Dim formattedSelection As Selection = iFormattedText.Selection
formattedSelection.Bold = True
iFormattedText.Selection = formattedSelection

For Each formField As FormField In iFormattedText.FormFields
    formField.DescriptiveText = "Quarterly results"
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [IFormattedText.Find Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/find-method/llms-full.txt)
- **Next:** [IFormattedText.Frames Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/frames-property/llms-full.txt)
