Nutrient Web SDK

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

Class

Example

Create a new ResetFormAction

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

Hierarchy

ResetFormActionDataActionResetFormAction

Constructors

Properties

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

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.

Default Value

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

Default Value

false

subActions

Optional

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

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