Community articleWriting a Form to Disk
Added by IBM contributorIBM on May 3, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.

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)
      r_short saveForm(form)
      formNodeP form;
   r_short error;
   /* 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);

Previous topic:
Setting a Value in a Form
Next topic:
Closing a Form