As of v2018R1, it is possible to get information about form field flags in Qoppa’s PDF libraries and components. These flags represent some of the field properties that can be found under the form field properties in PDF editing applications and our PDF components.

Field Flags Available

Interface FormField (available in all fields)

FormField.FF_READONLY -The field flag indicating the field is read only.
FormField.FF_REQUIRED -The field flag indicating the field value is required.
FormField.FF_NOEXPORT – The field flag indicating the field must not be exported.

Class TextField

TextField.FF_COMB – The field flag indicating the field is combed.
TextField.FF_DONOTSCROLL – The field flag indicating the field does not scroll.
TextField.FF_DONOTSPELLCHECK – The field flag indicating the field is not spell checked.
TextField.FF_FILESELECT – The field flag indicating the field contains a file path.
TextField.FF_MULTILINE -The field flag indicating the field can have multiple lines.
TextField.FF_PASSWORD – The field flag indicating the field contains a password.
TextField.FF_RICHTEXT – The field flag indicating the field contains rich text.

Class ChoiceField

ChoiceField.FF_COMBO – The field flag indicating the field is a combo box.
ChoiceField.FF_COMMITONSELECTION – The field flag indicating the field’s value is committed when a selection is made.
ChoiceField.FF_DONOTSPELLCHECK – The field flag indicating the field is not spell checked.
ChoiceField.FF_EDIT – The field flag indicating the field is editable if it is also a combo box.
ChoiceField.FF_MULTISELECT – The field flag indicating the field may have multiple options selected.
ChoiceField.FF_SORT – The field flag indicating the field’s options are sorted alphabetically.

Class PushButtonField

PushButtonField.FF_PUSHBUTTON – The field flag indicating the field is a push button.

Class RadioButtonGroupField

RadioButtonGroupField.FF_NOTOGGLETOOFF -The field flag indicating exactly one radio button must be selected at all times.
RadioButtonGroupField.FF_RADIO – The field flag indicating the field is a radio button.

Checking if a flag is enabled

You can check that a form field called “formfied” is read-only by calling:

// Check if the form field is read only
(formfield.getFieldFlags() & FormField.FF_READONLY) > 0

You can check that a form field called “formfied” is required by calling:

// Check if the form field is read only
(formfield.getFieldFlags() & FormField.FF_REQUIRED) > 0

You can check that an interactive text field called “textfield” is enabled for rich text by making the following call:

// Check if the rich text flag is enabled
(textfield.getFieldFlags() & TextField.FF_RICHTEXT ) > 0

It is easy to extrapolate to all the calls to make for all the other field flags.