FORM SAVE

Saves the current form or display in its current state for later use in the current Zim window.

Note: This command is invalid in Zim version 5 and above.

Syntax

FORM SAVE

Comments

This command should be used to preserve only dynamic changes to form field attributes (made using FORM SET(Attributes) commands) across FORM OPEN commands in the same window, when the current form or display in its current state is required at some later time.

Many forms and/or displays can be saved. When the FORM SAVE command is executed, the current form or display is pushed onto the stack of previously saved forms. Afterwards, no form or display is considered to be open in the window.

Saved forms or displays can be "popped" off the "stack" one at a time, using the FORM RESTORE command, to become the current form or display.

Note: The FORM SAVE command must only be used with forms that are selected in text windows - never forms in graphical windows. Use of this command in Zim for Windows can cause system termination.

Example

form open fEmployees
form set (protected) fEmployees.Salary  %Salary protected from edit
form display input
... processing commands - error detected...
form save
form open fErrorMsg
form display noclear
... processing commands ...
form open fEmployees NoClear           % Salary is still protected
form display

When an input error occurs, the form is saved in its current state, then an error message is displayed over the form on the screen. The form is later restored and displayed as it existed at the time of the FORM SAVE.

 

Related Topics