Class: 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.


new PSPDFKit.Actions.ResetFormAction(args)

Reset form fields in the current document.

Name Type Description
args Object

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


Create a new ResetFormAction

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




(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.

  • 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.

  • boolean
Default Value:
  • false