This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/editors/pdf/formfields/pdf-form-field.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PdfFormField

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 (, , , etc.) for type-specific functionality.

from nutrient_sdk import PdfFormField

Construction

PdfFormField cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.

Methods

get_child

def get_child(self, index: int) -> PdfFormField

Gets a child field by index.

Parameters:

NameTypeDescription
indexintThe 0-based index of the child field.

Returns: PdfFormField - The child at the specified index. Raises:


get_widget

def get_widget(self, index: int) -> PdfWidgetAnnotation

Gets a widget annotation by index.

Parameters:

NameTypeDescription
indexintThe 0-based index of the widget.

Returns: PdfWidgetAnnotation - The at the specified index. Raises:


remove_child_at

def remove_child_at(self, index: int) -> None

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

Parameters:

NameTypeDescription
indexintThe 0-based index of the child field to remove.

Raises:


Properties

child_count

@property
def child_count(self) -> int

The number of child fields.

Type: int

Read-only property.


default_value

@property
def default_value(self) -> str

The default value of the field.

Type: str

Read-only property.


field_type

@property
def field_type(self) -> PdfFormFieldType

The type of this form field.

Type: PdfFormFieldType

Read-only property.


full_name

@property
def full_name(self) -> str

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

Type: str

Read-only property.


is_read_only

@property
def is_read_only(self) -> bool
@is_read_only.setter
def is_read_only(self, value: bool) -> None

Whether the field is read-only.

Type: bool


is_required

@property
def is_required(self) -> bool
@is_required.setter
def is_required(self, value: bool) -> None

Whether the field is required.

Type: bool


is_terminal

@property
def is_terminal(self) -> bool

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

Type: bool

Read-only property.


name

@property
def name(self) -> str

The partial name of this field (T entry).

Type: str

Read-only property.


parent

@property
def parent(self) -> PdfFormField

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

Type: PdfFormField

Read-only property.


value

@property
def value(self) -> str
@value.setter
def value(self, value: str) -> None

The current value of the field.

Type: str


widget_count

@property
def widget_count(self) -> int

The number of widget annotations.

Type: int

Read-only property.


Inheritors