---
title: "PdfFormFieldCollection"
canonical_url: "https://www.nutrient.io/api/csharp/editors/pdf/formfields/pdf-form-field-collection/"
md_url: "https://www.nutrient.io/api/csharp/editors/pdf/formfields/pdf-form-field-collection.md"
last_updated: "2026-10-08T08:55:57.709Z"
description: "Represents a collection of form fields in a PDF document. Provides access to the top-level form fields in the document's AcroForm."
---

Represents a collection of form fields in a PDF document. Provides access to the top-level form fields in the document's AcroForm.

```csharp

using Nutrient;

```

The SDK creates this class through factory methods or other SDK objects.

## Collection access

`PdfFormFieldCollection` implements `IReadOnlyList<PdfFormField>`, so you can index it, read its `Count`, and iterate it with `foreach`.

```csharp

public PdfFormField this[int index] { get; }

```

Gets the element at the specified 0-based index. **Type:** [`PdfFormField`](/api/csharp/editors/pdf/formfields/pdf-form-field/)

## Properties

### Count

```csharp

public int Count { get; }

```

The number of top-level form fields in the document.

**Type:** `int`

## Methods

### AddCheckBoxField

```csharp

public PdfCheckBoxField AddCheckBoxField(string name, PdfPage page, float x, float y, float width, float height)

```

Adds a new check box field to the document on the specified page.

**Parameters**

| Name     | Type                                                 | Description                                                          |
| -------- | ---------------------------------------------------- | -------------------------------------------------------------------- |
| `name`   | `string`                                             | The name of the check box field. Must be unique within the document. |
| `page`   | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the check box field will be placed.                   |
| `x`      | `float`                                              | The x coordinate of the field's origin in points.                    |
| `y`      | `float`                                              | The y coordinate of the field's origin in points.                    |
| `width`  | `float`                                              | The width of the field in points.                                    |
| `height` | `float`                                              | The height of the field in points.                                   |

**Returns:** [`PdfCheckBoxField`](/api/csharp/editors/pdf/formfields/pdf-check-box-field/) - The newly created `PdfCheckBoxField`.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### AddComboBoxField

```csharp

public PdfComboBoxField AddComboBoxField(string name, PdfPage page, float x, float y, float width, float height)

```

Adds a new combo box (drop-down list) field to the document on the specified page.

**Parameters**

| Name     | Type                                                 | Description                                                          |
| -------- | ---------------------------------------------------- | -------------------------------------------------------------------- |
| `name`   | `string`                                             | The name of the combo box field. Must be unique within the document. |
| `page`   | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the combo box field will be placed.                   |
| `x`      | `float`                                              | The x coordinate of the field's origin in points.                    |
| `y`      | `float`                                              | The y coordinate of the field's origin in points.                    |
| `width`  | `float`                                              | The width of the field in points.                                    |
| `height` | `float`                                              | The height of the field in points.                                   |

**Returns:** [`PdfComboBoxField`](/api/csharp/editors/pdf/formfields/pdf-combo-box-field/) - The newly created `PdfComboBoxField`.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### AddListBoxField

```csharp

public PdfListBoxField AddListBoxField(string name, PdfPage page, float x, float y, float width, float height)

```

Adds a new list box field to the document on the specified page.

**Parameters**

| Name     | Type                                                 | Description                                                         |
| -------- | ---------------------------------------------------- | ------------------------------------------------------------------- |
| `name`   | `string`                                             | The name of the list box field. Must be unique within the document. |
| `page`   | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the list box field will be placed.                   |
| `x`      | `float`                                              | The x coordinate of the field's origin in points.                   |
| `y`      | `float`                                              | The y coordinate of the field's origin in points.                   |
| `width`  | `float`                                              | The width of the field in points.                                   |
| `height` | `float`                                              | The height of the field in points.                                  |

**Returns:** [`PdfListBoxField`](/api/csharp/editors/pdf/formfields/pdf-list-box-field/) - The newly created `PdfListBoxField`.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### AddPushButtonField

```csharp

public PdfPushButtonField AddPushButtonField(string name, PdfPage page, float x, float y, float width, float height)

```

Adds a new push button field to the document on the specified page.

**Parameters**

| Name     | Type                                                 | Description                                                            |
| -------- | ---------------------------------------------------- | ---------------------------------------------------------------------- |
| `name`   | `string`                                             | The name of the push button field. Must be unique within the document. |
| `page`   | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the push button field will be placed.                   |
| `x`      | `float`                                              | The x coordinate of the field's origin in points.                      |
| `y`      | `float`                                              | The y coordinate of the field's origin in points.                      |
| `width`  | `float`                                              | The width of the field in points.                                      |
| `height` | `float`                                              | The height of the field in points.                                     |

**Returns:** [`PdfPushButtonField`](/api/csharp/editors/pdf/formfields/pdf-push-button-field/) - The newly created `PdfPushButtonField`.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### AddRadioButtonField

```csharp

public PdfRadioButtonField AddRadioButtonField(string groupName, string optionName, PdfPage page, float x, float y, float width, float height)

```

Adds a new radio button to an existing or new radio button group on the specified page.

**Parameters**

| Name         | Type                                                 | Description                                                                                            |
| ------------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `groupName`  | `string`                                             | The name of the radio button group. All radio buttons with the same group name are mutually exclusive. |
| `optionName` | `string`                                             | The unique option name for this radio button within the group.                                         |
| `page`       | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the radio button will be placed.                                                        |
| `x`          | `float`                                              | The x coordinate of the field's origin in points.                                                      |
| `y`          | `float`                                              | The y coordinate of the field's origin in points.                                                      |
| `width`      | `float`                                              | The width of the field in points.                                                                      |
| `height`     | `float`                                              | The height of the field in points.                                                                     |

**Returns:** [`PdfRadioButtonField`](/api/csharp/editors/pdf/formfields/pdf-radio-button-field/) - The `PdfRadioButtonField` representing the radio button group.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### AddSignatureField

```csharp

public PdfSignatureField AddSignatureField(string name, PdfPage page, float x, float y, float width, float height)

```

Adds a new signature field to the document on the specified page.

**Parameters**

| Name     | Type                                                 | Description                                                          |
| -------- | ---------------------------------------------------- | -------------------------------------------------------------------- |
| `name`   | `string`                                             | The name of the signature field. Must be unique within the document. |
| `page`   | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the signature field will be placed.                   |
| `x`      | `float`                                              | The x coordinate of the field's origin in points.                    |
| `y`      | `float`                                              | The y coordinate of the field's origin in points.                    |
| `width`  | `float`                                              | The width of the field in points.                                    |
| `height` | `float`                                              | The height of the field in points.                                   |

**Returns:** [`PdfSignatureField`](/api/csharp/editors/pdf/formfields/pdf-signature-field/) - The newly created `PdfSignatureField`.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### AddTextField

```csharp

public PdfTextField AddTextField(string name, PdfPage page, float x, float y, float width, float height)

```

Adds a new text field to the document on the specified page.

**Parameters**

| Name     | Type                                                 | Description                                                     |
| -------- | ---------------------------------------------------- | --------------------------------------------------------------- |
| `name`   | `string`                                             | The name of the text field. Must be unique within the document. |
| `page`   | [`PdfPage`](/api/csharp/editors/pdf/pages/pdf-page/) | The page where the text field will be placed.                   |
| `x`      | `float`                                              | The x coordinate of the field's origin in points.               |
| `y`      | `float`                                              | The y coordinate of the field's origin in points.               |
| `width`  | `float`                                              | The width of the field in points.                               |
| `height` | `float`                                              | The height of the field in points.                              |

**Returns:** [`PdfTextField`](/api/csharp/editors/pdf/formfields/pdf-text-field/) - The newly created `PdfTextField`.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the field creation fails.

### Clear

```csharp

public void Clear()

```

Removes all form fields from the document.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when no document is loaded.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the operation fails.

### FindByFullName

```csharp

public PdfFormField? FindByFullName(string fullName)

```

Finds a form field by its full name (dot-separated path).

**Parameters**

| Name       | Type     | Description                            |
| ---------- | -------- | -------------------------------------- |
| `fullName` | `string` | The fully qualified name of the field. |

**Returns:** [`PdfFormField`](/api/csharp/editors/pdf/formfields/pdf-form-field/) or `null` - The `PdfFormField` if found, null otherwise.

### RemoveAt

```csharp

public void RemoveAt(int index)

```

Removes the form field at the specified index. This also removes any child fields and associated widget annotations.

**Parameters**

| Name    | Type  | Description                               |
| ------- | ----- | ----------------------------------------- |
| `index` | `int` | The 0-based index of the field to remove. |

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when index is out of range.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when the operation fails.

## Resource management

```csharp

public void Dispose()

```

`PdfFormFieldCollection` implements `IDisposable`. Call `Dispose()` or use a C# `using` declaration to release its native handle right away. If you don't, the handle is released when the object is garbage collected.

---

## Related pages

- [Formfields](/api/csharp/editors/pdf/formfields.md)
- [Pdf Check Box Field](/api/csharp/editors/pdf/formfields/pdf-check-box-field.md)
- [Pdf Combo Box Field](/api/csharp/editors/pdf/formfields/pdf-combo-box-field.md)
- [Pdf Form Field](/api/csharp/editors/pdf/formfields/pdf-form-field.md)
- [Pdf List Box Field](/api/csharp/editors/pdf/formfields/pdf-list-box-field.md)
- [Pdf Push Button Field](/api/csharp/editors/pdf/formfields/pdf-push-button-field.md)
- [Pdf Radio Button Field](/api/csharp/editors/pdf/formfields/pdf-radio-button-field.md)
- [Pdf Signature Field](/api/csharp/editors/pdf/formfields/pdf-signature-field.md)
- [Pdf Text Field](/api/csharp/editors/pdf/formfields/pdf-text-field.md)

