---
title: "PdfFormField"
canonical_url: "https://www.nutrient.io/api/csharp/editors/pdf/formfields/pdf-form-field/"
md_url: "https://www.nutrient.io/api/csharp/editors/pdf/formfields/pdf-form-field.md"
last_updated: "2026-10-08T08:55:57.709Z"
description: "Represents a form field in a PDF document. Form fields can be terminal (with widget annotations) or non-terminal (with child fields)."
---

Represents a form field in a PDF document. Form fields can be terminal (with widget annotations) or non-terminal (with child fields). This is the base class for all form field types. Use the specific subclasses (`PdfTextField`, `PdfCheckBoxField`, `PdfRadioButtonField`, etc.) for type-specific functionality.

```csharp

using Nutrient;

```

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

## Properties

### ChildCount

```csharp

public int ChildCount { get; }

```

The number of child fields.

**Type:** `int`

### DefaultValue

```csharp

public string DefaultValue { get; }

```

The default value of the field.

**Type:** `string`

### FieldType

```csharp

public PdfFormFieldType FieldType { get; }

```

The type of this form field.

**Type:** [`PdfFormFieldType`](/api/csharp/enums/pdf-form-field-type/)

### FullName

```csharp

public string FullName { get; }

```

The fully qualified name of this field (dot-separated path from root).

**Type:** `string`

### IsReadOnly

```csharp

public bool IsReadOnly { get; set; }

```

Whether the field is read-only.

**Type:** `bool`

### IsRequired

```csharp

public bool IsRequired { get; set; }

```

Whether the field is required.

**Type:** `bool`

### IsTerminal

```csharp

public bool IsTerminal { get; }

```

Whether this is a terminal field (has widget annotations instead of child fields). Terminal fields represent the actual interactive form elements.

**Type:** `bool`

### Name

```csharp

public string Name { get; }

```

The partial name of this field (T entry).

**Type:** `string`

### Parent

```csharp

public PdfFormField? Parent { get; }

```

The parent field of this field, or null if this is a top-level field.

**Type:** [`PdfFormField?`](/api/csharp/editors/pdf/formfields/pdf-form-field/)

### Value

```csharp

public string Value { get; set; }

```

The current value of the field.

**Type:** `string`

### WidgetCount

```csharp

public int WidgetCount { get; }

```

The number of widget annotations.

**Type:** `int`

## Methods

### GetChild

```csharp

public PdfFormField GetChild(int index)

```

Gets a child field by index.

**Parameters**

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

**Returns:** [`PdfFormField`](/api/csharp/editors/pdf/formfields/pdf-form-field/) - The child `PdfFormField` at the specified index.

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

### GetWidget

```csharp

public PdfWidgetAnnotation GetWidget(int index)

```

Gets a widget annotation by index.

**Parameters**

| Name    | Type  | Description                      |
| ------- | ----- | -------------------------------- |
| `index` | `int` | The 0-based index of the widget. |

**Returns:** [`PdfWidgetAnnotation`](/api/csharp/editors/pdf/annotations/pdf-widget-annotation/) - The `PdfWidgetAnnotation` at the specified index.

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

### RemoveChildAt

```csharp

public void RemoveChildAt(int index)

```

Removes a child field at the specified index. Also removes any grandchild fields and associated widget annotations.

**Parameters**

| Name    | Type  | Description                                     |
| ------- | ----- | ----------------------------------------------- |
| `index` | `int` | The 0-based index of the child 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()

```

`PdfFormField` 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 Collection](/api/csharp/editors/pdf/formfields/pdf-form-field-collection.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)

