dirtyflag

Records whether the form has been updated since the last save or submission. If the user attempts to close the form when the dirtyflag is set to on, the user will first be prompted to save their changes.

The dirtyflag is set to on whenever the user makes a change to the form. Such changes include typing information into the form, selecting choices in lists or with radio buttons, and so on. The dirtyflag is set to off whenever the user saves or submits the form.

Note that the dirtyflag is not set by computed changes to the form. For example, if the user clicks a button that triggers a compute, and that compute copies information to a field in the form, the dirtyflag would not be set. In these cases, the form should include additional computes that set the dirtyflag.

If necessary, the save prompt can be disabled by using a compute to set the dirtyflag to off.

This option is not saved or transmitted as part of the form. Instead, it is automatically created each time the form is read into memory, and is maintained only during display or processing.

Syntax

   <dirtyflag>status<dirtyflag>
Table 1. dirtyflag parameters
Parameter Type Description
status on indicates that the user has changed the form since the last save or network submission
  off indicates that the user has not changed the form since the last save or network submission

Available In

form global

Example

This example shows how the dirtyflag can be set to off.

   <button sid="ApplicationSpecificSave">
      <value>Save</value>
      <type>cancel</type>
      <custom:myoption xfdl:compute="toggle(activated, 'off', 'on') &#xA;
         == '1' ? &#xA;
         MySaveFunction() + set('global.global.dirtyflag', &#xA;
         'off') : ""></custom:myoption>
   </button>

Usage details

  1. Defaults: none
  2. The dirtyflag option is not saved or transmitted with the form description.