# Extract data from PDF forms using Flutter

Nutrient Flutter SDK allows you to extract data from form fields programmatically. Each form field has a fully qualified name, which is used to identify and retrieve a specific form field object before extracting its data.

## Obtaining the fully qualified name of a form field

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

```dart

dynamic allAnnotations = await pdfDocument.getAnnotations(0, 'all');
// Get the fully qualified name for the first form field.
String? formFieldName = (allAnnotations[0]['formFieldName']);

```

## Getting the data from a form field

The example below shows how to get the data from a form field with the fully qualified name, `formFieldName`:

```dart

// Get the data from a form field with the fully qualified name, `formFieldName`.
String? lastName = await pdfDocument.getFormFieldValue('formFieldName');

```

## Getting form field properties

You can also get the properties of a form field using the `getFormFields` method from the [`PdfDocument`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/PdfDocument-class.html) class. This method returns a list of `FormField` objects, and each field contains the most common properties for the form field. This can be useful for validating form fields and extracting additional data from them:

```dart

List<FormField> formFields = await pdfdocument.getFormFields();

for (FormField formField in formFields) {
  print('Field name: ${formField.name}');
  print('Field readOnly: ${formField.isReadOnly}');
  print('Field required: ${formField.isRequired}');...
}

```
---

## Related pages

- [PDF form library for Flutter](/guides/flutter/forms.md)
- [Flatten PDF forms in Flutter](/guides/flutter/forms/flatten.md)
- [Integrate PDF forms in Flutter](/guides/flutter/forms/embed-data-into-pdf.md)

