Class: ResetFormAction

PSPDFKit.Actions.ResetFormAction

PDF action to reset form fields in the current document.

It is an Immutable.Record and thus can be updated using set(key, value), for example: action.set("includeExclude", false);.

A ResetFormAction defines which form fields should be reset, when clicked on it. By default all form fields will be reset to their default value. The includeExclude field defines if the fields specified by fields, which are a PSPDFKit.Immutable.List of form field names, should reset all form fields excluding the defined fields or just the defined fields. When includeExclude is set to true, all form fields except the fields defined in fields will be reset. If includeExclude is set to false, which is the default value for this field, only the form fields defined in fields will be reset.

Constructor

new PSPDFKit.Actions.ResetFormAction(args)

Reset form fields in the current document.

Parameters:
Name Type Description
args object

An object with the keys fields and includeExclude used to initialize the action.

Example

Create a new ResetFormAction

const action = new PSPDFKit.Actions.ResetFormAction({
  fields: List(["exampleField"])
});

Extends

Members




Members

(nullable) fields: Immutable.List.<string>

A List identifying which fields to reset or which to exclude from resetting, depending on the setting of the includeExclude flag. Each element of the array shall be a text string representing the fully qualified name of a field. If this entry is omitted, the includeExclude flag shall be ignored; all fields in the document’s interactive form are reset.

Type:
  • Immutable.List.<string>
Default Value:
  • null

includeExclude: boolean

If false, the fields list specifies which fields to reset. If true, the fields list indicates which fields to exclude from resetting. That is, all fields in the document’s interactive form shall be reset except those listed in the fields list.

Type:
  • boolean
Default Value:
  • false

subActions: PSPDFKit.Immutable.List.<Action>

Actions can be chained by adding them to this immutable List.

Type: