Hierarchy
Constructors
Parameters
args{ … }
Optional
Properties
{ … } | null
Optional actions to execute when an event is triggered.
| Property | Description |
|---|---|
| onCalculate | Action to be performed to recalculate the value of a field. The name of this event in the PDF spec is |
| onChange | Execute an action when the value of the field changes. The name of this event in the PDF spec is |
| onBlur | Execute an action when the widget loses focus. The name of this event in the PDF spec is |
| onChange | Action to be performed when the user changes the value of the field. The name of this event in the PDF spec is |
| onFocus | Execute an action when the widget is focused. The name of this event in the PDF spec is |
| onFormat | Action to be performed before the field is formatted to display its current value. The name of this event in the PDF spec is |
| onInput | Action to be performed when the user types a key-stroke into a text field or combo box or modifies the selection in a scrollable list box. The name of this event in the PDF spec is |
| onPointerDown | Action to be performed when the pointer is pressed. |
| onPointerEnter | Action to be performed when the pointer enters the field area. |
| onPointerLeave | Action to be performed when the pointer hovers the field. |
| onPointerUp | Action to be performed when the pointer is released. |
Default Value
nullHolds an immutable list of NutrientViewer.Annotations.WidgetAnnotation#ids.
canSetGroup
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.
If true, the new value is committed as soon as a selection is made, without requiring the user to exit the field. Otherwise, the new value is not committed until the user exits the field.
Please note that Instance#getFormFieldValues will not return the latest value for this field until the user leaves this field by default. If you want this value to update on every change then set this to true.
Default Value
falsedefaultValues
Similar to the value property. The default values are only used when a form needs to be reset.
group
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.
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 NutrientViewer.Instance#ensureChangesSaved to make sure the form field has been persisted from the provider.
isDeletable
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.
isEditable
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.
isFillable
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.
If true, more than one of the field’s option items may be selected simultaneously. Otherwise, no more than one item at a time may be selected.
Default Value
falseUnique name of the form field (often referred to as fully qualified name). This name is used to link NutrientViewer.Annotations.WidgetAnnotation and is also used as an identifier for form field values.
Form fields with the noExport flag won't appear in the serialized payload of a form
submission.
Default Value
falseA list of FormOptions. This is necessary for multiple check boxes in a group.
See FormOption for more information.
Read only form fields can not be filled out (similar to disabled HTML input elements).
Default Value
falseRequired form fields must be filled out in order to submit the form.
NutrientViewer.FormFields.TextFormField, NutrientViewer.FormFields.ComboBoxFormField and
NutrientViewer.FormFields.ListBoxFormField with this flag set will be rendered with
the PSPDFKit-Annotation-Widget-Required public CSS class and the HTML required attribute set.
Default Value
falsevalues
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.
Immutable Record API
31
Indexable
- readonly [key: string]: any
Returns
IterableIterator<[keyof { … }, any]>
Returns
thisSee Also
Map#asImmutable
Returns
thisSee Also
Map#asMutable
Returns a new instance of this Record type with all values set to their default values.
Returns
this
delete<K extends keyof { … }>(key: K): this
Returns a new instance of this Record type with the value for the specific key set to its default value.
Parameters
otherunknownReturns
boolean
Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
Parameters
keystringReturns
key is string
Returns
number
Parameters
keyPathIterable<unknown>...collectionsunknown[]Returns
this
Parameters
keyPathIterable<unknown>...collectionsunknown[]Returns
this
remove<K extends keyof { … }>(key: K): this
Parameters
keyPathIterable<unknown>valueunknownReturns
this
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Returns
{ … }
Shallowly converts this Record to equivalent native JavaScript Object.
Returns
{ … }
Shallowly converts this Record to equivalent JavaScript Object.
Returns
{ … }
Returns
Keyed<keyof { … }, any>
Parameters
keyPathIterable<unknown>updater(value: unknown) => unknownReturns
this
Returns
booleanSee Also
Map#wasAltered
Note: Not all methods can be used on a mutable collection or within
withMutations! Onlysetmay be used mutatively.Parameters
mutator(mutable: this) => unknownReturns
thisSee Also
Map#withMutations
Base form field type for all form fields that allow multiple choices: