Nutrient Web SDK

Class 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", "www.nutrient.io");.

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

Class

Example

Create a new SubmitFormAction

const action = new NutrientViewer.Actions.SubmitFormAction({
uri: "www.nutrient.io"
});

Hierarchy

SubmitFormActionDataActionSubmitFormAction

Constructors

  • Parameters

    options
    { … }
    Optional

Properties

boolean

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

Default Value

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

Default Value

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

Default Value

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

Default Value

false
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)

Default Value

true
NutrientViewer.Immutable.List<string> | null | undefined

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.

Default Value

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

Default Value

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

Default Value

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

Default Value

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

Default Value

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

Default Value

true

subActions

Optional

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

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.

Default Value

false
boolean

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

Default Value

false
string

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

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.

Default Value

false

Immutable Record API

24

asImmutable

Deprecated
  • Deprecated

    Returns

    this

    Deprecated

    Not part of the collection API the Nutrient Web SDK supports. Build the value once, or use withMutations().

    See Also

    • Map#asImmutable

asMutable

Deprecated
  • Deprecated

    Returns

    this

    Deprecated

    Not part of the collection API the Nutrient Web SDK supports. Use withMutations().

    See Also

    • Map#asMutable

  • Returns a new instance of this Record type with all values set to their default values.

    Returns

    this
  • Returns a new instance of this Record type with the value for the specific key set to its default value.

    Type Parameters

    Kextends "subActions"

    Parameters

    keyK

    Returns

    this
  • Returns a new instance of this Record type with the value at the given key path removed.

    Also available as removeIn.

    Parameters

    keyPathIterable<unknown>

    Returns

    this
  • Parameters

    otherunknown

    Returns

    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.

    Type Parameters

    Kextends "subActions"

    Parameters

    keyK

    Returns

    { … }[K]
  • Parameters

    keyPathIterable<unknown>
    notSetValueunknown
    Optional

    Returns

    unknown
  • Parameters

    keyunknown

    Returns

    boolean
  • Parameters

    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this
  • Parameters

    merger(previous?: unknown, next?: unknown, key?: string) => unknown
    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this

mergeIn

Deprecated
  • Deprecated

    Parameters

    keyPathIterable<unknown>
    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this

    Deprecated

    Not part of the collection API the Nutrient Web SDK supports. Use update() followed by merge().

  • Parameters

    merger(previous?: unknown, next?: unknown, key?: string) => unknown
    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this

removeIn

Deprecated
  • Deprecated

    Parameters

    keyPathIterable<unknown>

    Returns

    this

    Deprecated

    Not part of the collection API the Nutrient Web SDK supports. Use deleteIn(), or update() followed by delete().

  • Parameters

    keyPathIterable<unknown>
    valueunknown

    Returns

    this

toSeq

Deprecated
  • Deprecated

    Returns

    Keyed<string, unknown>

    Deprecated

    Not part of the collection API the Nutrient Web SDK supports. Use entries().

  • Parameters

    keyPathIterable<unknown>
    notSetValueunknown
    updater(value: unknown) => unknown

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    updater(value: unknown) => unknown

    Returns

    this
  • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

    Parameters

    mutator(mutable: this) => unknown

    Returns

    this

    See Also

    • Map#withMutations