14.2. Form Templates and Form Data

The InfoPath client reads the information in the form template to display the required views and controls based on the form schema. The user enters data into the controls and then saves the resulting data file either to the local drive or to a centrally accessible form data repository such as a SharePoint form library. The important point to remember here is that the form template is not copied to the form library when the user saves the data file. That only happens when the template is published to the library. (See the section on form publishing for a more detailed description of the publishing process.) Since only the form data file is stored into the form library, how does InfoPath know which template to use when the user opens the form?

Well, in the case of SharePoint form libraries, the simple answer is that InfoPath can look at the form library itself to determine which template is associated with the data file and then open the template from there, but form data files can also be stored locally or in a document library or some repository other than SharePoint. In those cases, the information about which template to use is taken from the form data file itself.

Say that you have a form data file on your desktop and you double-click the file to edit the data. InfoPath form data files contain a special processing instruction that tells InfoPath that the data represents an instance of an InfoPath form schema, and where the form template is ...

Get Professional SharePoint® 2007 Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.