dirtyflagAdded by IBM on October 10, 2012 | Version 1 (Original)
|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. Tags: dirtyflag option, options, forms, status: detecting
a change in the forms status, flags, save prompt, prompting to save a form, form global, XFDL, 8.0, spec
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.
Table 1. dirtyflag parameters
|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|
Example This example shows how the dirtyflag can be set to off.
<custom:myoption xfdl:compute="toggle(activated, 'off', 'on')
== '1' ?
MySaveFunction() + set('global.global.dirtyflag',
'off') : ""></custom:myoption>
- Defaults: none
- The dirtyflag option is not saved or transmitted with the form description.