Class: CheckBoxFormField

PSPDFKit.FormFields.CheckBoxFormField

A check box that can either be checked or unchecked. One check box form field can also be associated to multiple single check box widgets. In this case, option contains the value of the associated PSPDFKit.FormOption

To retrieve a list of all form fields, use PSPDFKit.Instance#getFormFields.

Extends

Members




Members

(nullable) additionalActions: PSPDFKit.FormFieldAdditionalActions

Optional actions to execute when an event is triggered.

Type:
Default Value:
  • null

annotationIds: Immutable.List.<string>

Holds an immutable list of PSPDFKit.Annotations.WidgetAnnotation#ids.

Type:
  • Immutable.List.<string>

(readonly) canSetGroup: boolean

This property defines whether the user has permission to edit the group of this form field. The value of this field depends on the set of collaboration permissions defined in the JWT token.

It is only available when collaboration permissions is enabled on Server-Backed deployments.

Type:
  • boolean

defaultValues: Immutable.List.<string>

Similar to the value property. The default values are only used when a form needs to be reset.

Type:
  • Immutable.List.<string>

group: string

This property is used to define the permission scope for this form-field, it's corresponding widget-annotations and form field values. If you change the group of a form field, the corresponding widget annotations and form field values will inherit it.

It is only available when collaboration permissions is enabled on Server-Backed deployments.

Type:
  • string

id: string

A unique identifier to describe the form field record. When a form field is created in the UI, the viewer has to generate a unique ID.

When changes are saved to the underlying form field provider, we call PSPDFKit.Instance#ensureFormFieldSaved to make sure the form field has been persisted from the provider.

Type:
  • string

(readonly) isDeletable: boolean

This property defines whether this form field can be deleted or not. The value of this field depends on the set of collaboration permissions defined in the JWT token.

It is only available when collaboration permissions is enabled on Server-Backed deployments.

Type:
  • boolean

(readonly) isEditable: boolean

This property defines whether this form-field can be edited or not. The value of this field depends on the set of collaboration permissions defined in the JWT token.

It is only available when collaboration permissions is enabled on Server-Backed deployments.

Type:
  • boolean

(readonly) isFillable: boolean

This property defines whether this form-field can be filled or not. The value of this field depends on the set of collaboration permissions defined in the JWT token.

It is only available when collaboration permissions is enabled on Server-Backed deployments.

Type:
  • boolean

label: string

Used to identify the form field in the UI or for accessibility.

Type:
  • string

name: string

Unique name of the form field (often referred to as fully qualified name). This name is used to link PSPDFKit.Annotations.WidgetAnnotation and is also used as an identifier for form field values.

Type:
  • string

noExport: boolean

Form fields with the noExport flag won't appear in the serialized payload of a form submission.

Type:
  • boolean
Default Value:
  • false

(nullable) optionIndexes: PSPDFKit.Immutable.List.<number>

Radio buttons and checkboxes can have multiple widgets with the same form value associated, but can be selected independently. optionIndexes contains the value indexes that should be actually set.

If set, the value field doesn't get used, and the widget found at the corresponding indexes in the form field's annotationIds property are checked.

If set on fields other than radio buttons or checkboxes, setting the form value will fail.

Type:

options: Immutable.List.<PSPDFKit.FormOption>

A list of PSPDFKit.FormOptions. This is necessary for multiple check boxes in a group.

See PSPDFKit.FormOption for more information.

Type:

pdfObjectId: number

The object ID of the form field object in the PDF.

Type:
  • number

readOnly: boolean

Read only form fields can not be filled out (similar to disabled HTML input elements).

Type:
  • boolean
Default Value:
  • false

required: boolean

Required form fields must be filled out in order to submit the form.

PSPDFKit.FormFields.TextFormField, PSPDFKit.FormFields.ComboBoxFormField and PSPDFKit.FormFields.ListBoxFormField with this flag set will be rendered with the PSPDFKit-Annotation-Widget-Required public CSS class and the HTML required attribute set.

Type:
  • boolean
Default Value:
  • false

(readonly) values: Immutable.List.<string>

An immutable list of all selected form option values. If no options are defined, a checked check box will have values: List(["Yes"]);.

If the list is empty, no check box is checked.

In order to modify it, instance.setFormFieldValues() should be used.

Type:
  • Immutable.List.<string>