Class: SubmitFormAction

PSPDFKit.Actions.SubmitFormAction

PDF action to submit form fields in the current document.

It is an Immutable.Record and thus can be updated using set(key, value), for example: action.set("uri", "https://pspdfkit.com");.

A SubmitFormAction defines which form fields should be submitted, when clicked on it. The form field names and their values will get submitted to the provided URI defined by the uri field. By default all form fields will be submitted. The includeExclude field defines if the fields specified by fields, which are a PSPDFKit.Immutable.List of form field names, should submit 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 submitted. If includeExclude is set to false, which is the default value for this field, only the form fields defined in fields will be submitted.

Constructor

new PSPDFKit.Actions.SubmitFormAction(args)

Submit form field names and values of the current document.

Parameters:
Name Type Description
args object

An object of the members.

Example

Create a new SubmitFormAction

const action = new PSPDFKit.Actions.SubmitFormAction({
  uri: "https://pspdfkit.com"
});

Extends

Members




Members

canonicalFormat: boolean

This option is not supported yet. If true, any submitted field values representing dates shall be converted to the standard format.

Type:
  • boolean
Default Value:
  • false

embedForm: boolean

This option is not supported yet. shall be used only when the form is being submitted in Forms Data Format (that is, when both the XFDF and ExportFormat flags are false). If true, the F entry of the submitted FDF shall be a file specification containing an embedded file stream representing the PDF file from which the FDF is being submitted.

Type:
  • boolean
Default Value:
  • false

excludeFKey: boolean

This option is not supported yet. Shall be used only when the form is being submitted in Forms Data Format (that is, when both the XFDF and ExportFormat flags are false). If true, the submitted FDF shall exclude the F entry.

Type:
  • boolean
Default Value:
  • false

excludeNonUserAnnotations: boolean

This option is not supported yet. shall be used only when the form is being submitted in Forms Data Format (that is, when both the XFDF and ExportFormat flags are false) and the IncludeAnnotations flag is true. If true, it shall include only those markup annotations those T entry matches the name of the current user, as determined by the remote server to which the form is being submitted.

Type:
  • boolean
Default Value:
  • false

exportFormat: boolean

Meaningful only if the submitPDF and xfdf flags are false. If set, field names and values shall be submitted in HTML Form format. If false, they shall be submitted in Forms Data Format (FDF)

Type:
  • boolean
Default Value:
  • true

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

A List identifying which fields to submit or which to exclude from submitting, 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 submitted.

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

getMethod: boolean

If true, field names and values shall be submitted using an HTTP GET request. If false, they shall be submitted using a POST request. This flag is meaningful only when the exportFormat flag is set. If exportFormat is false, this flag shall also be false.

Type:
  • boolean
Default Value:
  • false

includeAnnotations: boolean

This option is not supported yet. shall be used only when the form is being submitted in Forms Data Format (that is, when both the XFDF and ExportFormat flags are false). If set, the submitted FDF file shall include all markup annotations in the underlying PDF document. If false, markup annotations shall not be included.

Type:
  • boolean
Default Value:
  • false

includeAppendSaves: boolean

This option is not supported yet. Shall be used only when the form is being submitted in Forms Data Format (that is, when both the XFDF and ExportFormat flags are false). If true, the submitted FDF file shall include the contents of all incremental updates to the underlying PDF document, as contained in the Differences entry in the FDF dictionary. If false, the incremental updates shall not be included.

Type:
  • boolean
Default Value:
  • false

includeExclude: boolean

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

Type:
  • boolean
Default Value:
  • false

includeNoValueFields: boolean

This option is not supported yet. If true, all fields designated by the Fields array and the IncludeExclude flag shall be submitted, regardless of whether they have a value. For fields without a value, only the field name shall be transmitted. If false, fields without a value shall not be submitted.

Type:
  • boolean
Default Value:
  • true

subActions: PSPDFKit.Immutable.List.<Action>

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

Type:

submitCoordinated: boolean

This option is not supported yet. If true, the coordinates of the mouse click that caused the submit-form action shall be transmitted as part of the form data. The coordinate values are relative to the upper-left corner of the field’s widget annotation rectangle. They shall be represented in the data in the format name.x=xval&name.y=yval where name is the field’s name.

Type:
  • boolean
Default Value:
  • false

submitPDF: boolean

If true, the document shall be submitted as PDF, using the MIME content type application/pdf.

Type:
  • boolean
Default Value:
  • false

uri: string

The uniform resource identifier (web link) defining where the form should be submitted to, when this action got triggered.

Type:
  • string

xfdf: boolean

This option is not supported yet. Shall be used only if the SubmitPDF flags are false. If true, field names and values shall be submitted as XFDF.

Type:
  • boolean
Default Value:
  • false