PDF Form Field Flags in iOS
Flags are sets of Boolean properties on an object. Each form field and form element in a document has flags that define behavior and capabilities. A form field tracks the entered data value. A form element is the visual object shown on a PDF page, and it’s represented by a widget annotation.
true, then the UI won’t allow the form field to be filled or its value to be changed. You can also use the
isEditableproperty on the form field as a transient property to disable user interaction. In other words,
isReadOnlyis persisted in the PDF, while
isEditableisn’t. Note that the
.lockedContentsflags on the form element have no effect.
isRequiredflag is exposed but only partially supported. The elements of any fields marked as required will be displayed with a red border. However, PSPDFKit will allow form submission actions to run, even if some required form fields are empty.
isNoExportflag is exposed but not supported.
RadiosInUnison flags from the PDF reference aren’t exposed or supported.
Sort flag from the PDF reference isn’t exposed because the reference states that this flag isn’t intended to be used by PDF readers.
Since form elements are a type of widget annotation, you can access form element flags using the
flags property inherited from
Annotation. Therefore, the API for working with form element flags is mostly the same as the API for annotation flags. These can be used to make form elements hidden. See our Annotation Flags guide to learn more.
There are some exceptions for forms:
PSPDFKit doesn’t provide any UI to edit form elements themselves, such as one for moving or resizing an element. Therefore, the
.lockedflag has no effect because there’s nothing to lock.