This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/flutter/forms/fill-form-fields/programmatic.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Fill PDF form fields programmatically

Nutrient Flutter SDK enables you to fill form fields programmatically. Each form field has a fully qualified name that identifies a specific form field object before you fill it.

Get the fully qualified name of a form field

The following example gets the fully qualified name of the first form field on the first page of a document:

final fields = await controller.document.forms.getFormFields();
// Get the fully qualified name of the first form field.
final String? formFieldName = fields.first.fullyQualifiedName;

Fill the value of a form field

The following example fills a form field with the fully qualified name formFieldName. It also sets two radio buttons with the fully qualified names radioFieldName_0 and radioFieldName_1:

final forms = controller.document.forms;
await forms.setFormFieldValue('Dummy Form Field Value', 'formFieldName');
// For radio buttons and checkboxes, use `selected` and `deselected`.
await forms.setFormFieldValue('selected', 'radioFieldName_0');
await forms.setFormFieldValue('deselected', 'radioFieldName_1');