Once you have finished making the desired changes to the form, you should save it to disk. If you want to retain the original form (calculateAge.xfd), you should save the modified form under a new name. This program saves the modified form as Output.xfd.
The following example implements the function saveForm. This function calls the API function UFLWriteForm that writes a form to disk.
r_short saveForm(formNodeP form)
/* Call UFLWriteForm. The parameters are:
1. form : a pointer to the root node of the form.
2. output.xfd : the filename you want to use (you could also use a path
3. NULL : since we do not want to set a triggeritem.
4. 0 : since we do not want to allow the transmit options to work.
An error code is returned if there is a problem. */
error = UFLWriteForm (form, "output.xfd", NULL, 0);
if (error != OK)
reportError("UFLWriteForm error %hd.\n", error);
Parent topic: Developing an application in C
Previous topic: Setting a Value in a Form
Next topic: Closing a Form