---
title: "PDF form field flags | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/forms/create-edit-and-remove/form-field-flags/"
md_url: "https://www.nutrient.io/guides/web/forms/create-edit-and-remove/form-field-flags.md"
last_updated: "2026-05-30T02:20:01.393Z"
description: "Configure PDF form field flags in JavaScript with Nutrient Web SDK. Set noExport, readOnly, and required properties to control field behavior and validation requirements."
---

# PDF form field flags

Form fields inherit annotation flags through their associated widget annotations.

## Inherited annotation flags

Every [`Annotation`](https://www.nutrient.io/api/web/NutrientViewer.Annotations.html) in a document can specify flags that further define its behavior and capabilities. These flags can be accessed directly on each annotation through the corresponding properties.

### Capabilities of flags

Annotation flags are part of the PDF specification and define the annotation’s behavior, its presentation on a screen and on paper, and the available editing features given to your users. Here are a few examples of things you can do with flags:

- An annotation with the [`noView`](https://www.nutrient.io/api/web/NutrientViewer.Annotations.Annotation.html#noView) flag won’t be rendered in the UI but may be printable.

- An annotation with the [`noPrint`](https://www.nutrient.io/api/web/NutrientViewer.Annotations.Annotation.html#noPrint) flag won’t be printed.

- An annotation with the [`noRotate`](https://www.nutrient.io/api/web/NutrientViewer.Annotations.Annotation.html#noRotate) flag won’t change its rotation when a page rotation is specified. Instead, it’ll be locked to the top-left corner of its bounding box. This is currently only enabled for [`NoteAnnotation`](https://www.nutrient.io/api/web/NutrientViewer.Annotations.NoteAnnotation.html).

### Setting annotation flags

Here’s an example of how to create a non-viewable annotation by setting the corresponding `noView` flag:

```js

// Create a new annotation.
let annotation = new NutrientViewer.Annotations.RectangleAnnotation({
		pageIndex: 0,
		boundingBox: new NutrientViewer.Geometry.Rect({
				left: 200,
				top: 150,
				width: 250,
				height: 75
		})
	})
});

// Update the annotation flags.
annotation = annotation.set("noView", true);

// Add the newly created annotation to the document.
instance.create(annotation);

```

## Form field flags

Form field flags determine a form field’s behavior according to the PDF spec. They all default to `false`:

- [`noExport`](https://www.nutrient.io/api/web/NutrientViewer.FormFields.FormField.html#noExport) — If `true`, the form field can’t be exported.

- [`readOnly`](https://www.nutrient.io/api/web/NutrientViewer.FormFields.FormField.html#readOnly) — If `true`, the form field value can’t be modified.

- [`required`](https://www.nutrient.io/api/web/NutrientViewer.FormFields.FormField.html#required) — If `true`, the form field must be filled out to submit the form.

You can modify the form field flags similar to how you would modify annotations:

```js

NutrientViewer.load().then(async (instance) => {
	const formFields = await instance.getFormFields();
	if (formFields.size === 0) {
		return;
	}
	const formField = formFields.first();
	instance.update(formField.set('noExport', true));
});

```
---

## Related pages

- [Build a browser form template builder](/guides/web/forms/browser-form-template-builder.md)
- [Adding a signature field to a PDF form](/guides/web/forms/create-edit-and-remove/add-signature-field.md)
- [JavaScript PDF Form Creator](/guides/web/forms/create-edit-and-remove/built-in-ui.md)
- [Edit PDF form fields using JavaScript](/guides/web/forms/create-edit-and-remove/edit-fields.md)
- [Remove form fields from PDFs using JavaScript](/guides/web/forms/create-edit-and-remove/remove-fields.md)
- [Create fillable PDF forms using JavaScript](/guides/web/forms/form-creation.md)

