# FormFieldCollection.GetItem Method

> Gets a particular form field from the collection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **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 > FormFieldCollection.GetItem Method
- **798 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfieldcollection/getitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfieldcollection/getitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfieldcollection/getitem-method/llms-full.txt

---

### Description

Gets a particular form field from the collection.

### Syntax

#### GetItem()

Gets the form field at the current input position or null if there is no form field at the current input position.

```csharp
public FormField GetItem();
```

```vbnet
Public Function GetItem() As FormField
```

#### GetItem(int)

Gets the form field with the specified id, previously set with the [FormField.ID](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/id-property/llms-full.txt) property.

```csharp
public FormField GetItem(int id);
```

```vbnet
Public Function GetItem(id As Integer) As FormField
```

| Parameter | Description |
|---|---|
| id | Specifies the form field's identifier. The method returns null, if a form field with the specified identifier does not exist. |

### Examples

The following example works with form fields in the current document by using `FormFieldCollection.get_Item`.

```csharp
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
FormFieldCollection formFieldCollection = textControl.FormFields;
formFieldCollection.Add(new CheckFormField(false) { Name = "AcceptTerms", ID = 100 });

FormField result = formFieldCollection.GetItem(100);
result?.ScrollTo();
```

```vbnet
textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim formFieldCollection As FormFieldCollection = textControl.FormFields
formFieldCollection.Add(New CheckFormField(False) With { .Name = "AcceptTerms", .ID = 100 })

Dim result As FormField = formFieldCollection.GetItem(100)
If result IsNot Nothing Then result.ScrollTo()
```

---

## Nearby

- **Previous:** [FormFieldCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfieldcollection/copyto-method/llms-full.txt)
- **Next:** [FormFieldCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfieldcollection/item-property/llms-full.txt)
