When a user leaves a data form, you will often need to know whether the form was exited in a normal fashion or if the user quit the form. If the user quit the form, you may not want to transfer the contents of the form data variables to permanent storage.
You can determine whether a form was exited or quit by testing the return value of fm_proc() or fm_rd(). Both fm_proc() and fm_rd() return the action code that caused it to return. Action codes are control variables used by the form editor to determine the flow of form processing. (Action codes and their use are explained in detail in Chapter 29, "How Form and Menu Processing Works.") The action code AC_QUIT is returned if the user quit the data form. AC_EXIT is returned by these functions if the user exited from the data form.
When you have two or more forms linked together, the return value of fm_proc() and fm_rd() represents the action code for the last form processed. Going to a next or previous form is equivalent to exiting the current form. When the form is exited, fm_convert() is called to update the data variables with the values entered by the user in the form.