fm_convert() allows you to make an intermediate save to store data already entered in the form and would be useful for implementing a "save" event function.
The call for fm_convert() is as follows:
|
fm_convert() checks each field. If the field has the SKIP option turned ON, it is considered valid, since the user cannot enter any data into the field. If the SKIP option is not ON, and the field has not been validated (i.e., the validated flag is set to FALSE), the field is validated. For forms that are being processed when fm_convert() is called, validation errors will be flagged, the cursor placed in the invalid field entry and a message displayed.
For forms that are not being processed when fm_convert() is called and an invalid field is found, the next action code is set to inform the editor where to go next (i.e., usually the invalid field). You can determine the invalid field on the form by calling fm_nextitem(dfmp).
Once all fields are validated, the data in the fields will be converted to the proper data variable types and copied to the data variables associated with the fields. If a SKIP field has data in it, this data is also converted. If you put data into a SKIP field, you are responsible for ensuring that the data is valid.