---
title: "Fill PDF form fields programmatically in React Native | Nutrient"
canonical_url: "https://www.nutrient.io/guides/react-native/forms/fill-form-fields/programmatic/"
md_url: "https://www.nutrient.io/guides/react-native/forms/fill-form-fields/programmatic.md"
last_updated: "2026-05-22T14:49:21.711Z"
description: "Learn how to fill form fields programmatically in React Native using Nutrient. Discover examples for setting values and managing radio buttons efficiently."
---

# Fill PDF form fields programmatically in React Native

Nutrient React Native SDK allows you to fill form fields programmatically. Each form field has a fully qualified name used to identify and retrieve a specific form field object before filling it.

## Getting the fully qualified name of a form field

The example below shows how to obtain the fully qualified name of the first form field of a document:

```js

const formElements = await this.pdfRef.current?.getDocument().forms.getFormElements();
const firstFormFieldName = formElements[0].fullyQualifiedFieldName;

```

The `getFormElements` method returns an array of `FormElement` objects. See the [API reference](https://www.nutrient.io/api/react-native/FormElement.html) for a list of available objects.



## Filling the value of a form field

The example below shows how to fill the value of a form field with a fully qualified name (`fullyQualifiedFieldName`) and two radio buttons with fully qualified names (`radioFieldName_0` and `radioFieldName_1`):

```js

this.pdfRef.current?.getDocument().forms.getFormElements().updateTextFormFieldValue(
		'fullyQualifiedFieldName',
		'Form Field Value',
	);

// For radio buttons and checkboxes, use `true` and `false`.
this.pdfRef.current?.getDocument().forms.getFormElements().updateButtonFormFieldValue('radioFieldName_0', true);
this.pdfRef.current?.getDocument().forms.getFormElements().updateButtonFormFieldValue('radioFieldName_1', false);

```

For more details and sample code, see the [`ProgrammaticFormFilling.tsx` example](https://github.com/PSPDFKit/react-native/tree/master/samples/Catalog/examples/ProgrammaticFormFilling.tsx) from the [Catalog example project](https://www.nutrient.io/guides/react-native/prebuilt-solutions/example-projects.md#pspdfkit-catalog).
---

## Related pages

- [Disable PDF form editing in React Native](/guides/react-native/forms/fill-form-fields/disable-editing.md)
- [Form field support in our React Native PDF viewer](/guides/react-native/forms/fill-form-fields/using-the-ui.md)

