If your event function does not wish to terminate the processing of the current panel, it should return a value of 1 on success and 0 on error. For example, if you write an event function for the form event table that causes the user to jump to a particular field on the form, your event function should call sfm_nextitem() to move the user to the new item, and return a value of 1.
However, if your event function will terminate processing, the function should return an action code that indicates why processing is being terminated. For example, if you write an event function that exits the current form, the event function should return the action code AC_EXIT. Action codes that can be returned from your event functions include:
If you are calling an existing Vermont Views function from your event function, the easiest way to ensure that you return the correct value from your event function is to return the value returned by the Vermont Views function. For example, if your event function calls kd_lftcsr(), you can use this function to set your return value in one of two ways. An example of the first way is:
|
Alternatively, you could use this statement as your return statement:
|