restoreState

Restores the form nodes of a form to their original state, including resetting the visual properties of fields such as changes to border colors.

Syntax

Reference_Syntax.restoreState = "none | manual | auto"

Values

Type

Values

String

  • none (default): The state and restore information are not saved.

  • manual : Specific properties are saved and restored using script objects.

  • The checksum is verified.

  • All state information is restored using the restore method.

  • Field values and calculation overrides are restored if the checksum was valid.

  • auto (default for new forms): Automatically saves and restores the form to its original state. When opening a certified form, the state will not be restored. On an uncertified form, certification of the document will not be allowed.

  • The checksum is verified

  • After the merge step is complete but prior to calculations being executed, each form node will have its state restored using the saved form model only if the checksum was valid.

  • Field values and calculation overrides are restored if the checksum was valid.

If the root subform uses this value, the following properties are saved and restored:

  • The checksum is verified.

  • All state information is restored using the restore method.

  • Field values and calculation overrides are restored if the checksum was valid.

  • auto (default for new forms): Automatically saves and restores the form to its original state. When opening a certified form, the state will not be restored. On an uncertified form, certification of the document will not be allowed.

  • The checksum is verified

  • After the merge step is complete but prior to calculations being executed, each form node will have its state restored using the saved form model only if the checksum was valid.

  • Field values and calculation overrides are restored if the checksum was valid.

The auto setting can not be used for certified documents.

If the root subform uses this value, the following properties and saved and restored:

  • The checksum is verified

  • After the merge step is complete but prior to calculations being executed, each form node will have its state restored using the saved form model only if the checksum was valid.

  • Field values and calculation overrides are restored if the checksum was valid.

Applies to

Version

XFA 2.5

Examples

JavaScript

Subform1.restoreState = "auto";

FormCalc

Subform1.restoreState = "auto"

// Ethnio survey code removed