Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office InfoPath
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Best practices for publishing forms
 
Applies to
Microsoft Office InfoPath™ 2003 Service Pack 1 or later

There are several steps you can take to make publishing and updating forms easier and more efficient. These best practices can also help you avoid some of the issues users run into when filling out forms based on form templates (form template: In InfoPath, a file or set of files that defines the data structure, appearance, and behavior of a form.) that have been updated after they were published. In particular, this article covers the following topics:

General tips

Publishing forms to shared folders, Web servers, and SharePoint sites

Configuring data connections

Creating fully trusted forms

Updating published forms

General tips

Publishing forms

Ensure that users have InfoPath installed  Regardless of where and how you publish a form, your users must have InfoPath installed on their computers before they can fill out the form. If you need to allow users without InfoPath to fill out a form, you can create a Web form version of your InfoPath form by using Microsoft ASP.NET. The Web form will not support the rich features found in InfoPath, including offline use, data validation (data validation: The process of testing the accuracy of data; a set of rules you can apply to a control to specify the type and range of data that users can enter.), the spelling checker, and rich-text formatting.

Use the Publishing Wizard to deploy a form  When you are ready for users to fill out your form, you should publish it by using the Publishing Wizard. This wizard helps you publish forms to a shared folder on a computer, to a form library (form library: A folder in which a collection of forms based on the same template is stored and shared. Each form in a form library is associated with user-defined information that is displayed in the content listing for that library.) on a Microsoft Windows® SharePoint® Services Web site, or to a Web server.

Ensure that the form is accessible  Whenever a user opens an InfoPath form to fill it out, that form must access the associated form template (form template: In InfoPath, a file or set of files that defines the data structure, appearance, and behavior of a form.) in order to function properly. Although InfoPath caches form templates on users' computers to enable them to work offline, the form template must be accessible when the user first fills out the form. In addition, the form template must be accessible in order for the form to access any updates made to the form template.

Save published forms, instead of republishing them  After a form is published, the location where it is saved has been established. If you need to make changes to a published form, open it in design mode (design mode: The InfoPath design environment in which you can create or modify a form template.), make the change, and then click Save on the File menu. There is no need to republish the form. The next time a user fills out the form, the user will see the updated version.

When sending form templates in e-mail messages, keep the form location accessible  Before you send a form template to others, it is recommended that you publish the form template to a location that is accessible to your users. This enables you to update the form more easily and allows certain features to work correctly, including data connections (data connection: The connection between an InfoPath form and an external data source, such as a database, Web service, SharePoint library, or XML file. Data connections are used to query and submit data.), custom task panes (custom task pane: An .html file whose content is displayed in a window next to a form. Custom task panes can provide form-specific commands and Help content.), Microsoft ActiveX controls (ActiveX control: A custom control. Form designers can add or remove ActiveX controls in the Controls task pane.), and managed code. If you prefer to send the form without publishing it to a shared location, you can digitally sign the form and mark it as fully trusted. This enables form features to work correctly and allows you to send updated versions of the form to others by using an e-mail program.

If a form won't open because of an error, open the form directly in design mode  In some cases, particularly when the form template has been moved, you will not be able to open the form template to fill out a form. If that happens, try opening the form template directly in design mode: Right-click the form template (.xsn file) and click Design on the shortcut menu. The form template should open in design mode, at which point you can republish the form to establish a new location.

Publishing forms to shared folders, Web servers, and SharePoint sites

Ensure that users can access the shared folder  If you publish a form to a local folder on your computer, it is important that you use a path that includes the name of your computer. That is because users filling out forms saved to shared folders usually access the form by using the full Universal Naming Convention (UNC) (universal naming convention (UNC): A naming convention for files that provides a machine-independent means of locating the file. Rather than specifying a drive letter and path, a UNC name uses the syntax \\server\share\path\filename.) for the folder, including the name of the computer where it is located. For example, you might publish a form to a folder on your computer by using the local path <drive>:\Example\, while users would be more likely to access the form by using the full UNC path \\Servername\Example\. To solve this problem, you can use the local path when publishing the form and include the full UNC path as an alternate access path.

Ensure that users have write permissions to the shared folder  If you publish a form to a shared folder, you must make sure that your users have write permissions to the shared folder before publishing the form. This enables your users to fill out the form and save it back to the same folder.

Ensure that Microsoft WebDAV is enabled when publishing to a Web server  When you publish a form by using the InfoPath Publishing Wizard, you can choose to publish the form to a Web server or a shared folder. If you choose a Web server, InfoPath publishes your form directly to the server by using WebDAV, which is an extension of HTTP that allows remote authoring and management of Web content. If you are publishing a form to a Web server that does not support WebDAV or has disabled WebDAV, choose the shared folder option in the Publishing Wizard, and then enter the Web server's address as an alternate access path later in the wizard.

Display repeating data in a SharePoint form library  When publishing a form to a SharePoint form library, you can display data from the form in the form library. If you want to display data from a repeating field in the form, you must define how you want to display that field. You can choose whether to display the first value in the field, the last value, or a count of all the occurrences of the field, or whether to merge all of the values together. To define how to display the repeating table data, click the option you want in the Choose a function to use on repeating data list, when you are choosing which columns to display in the form library.

Configuring data connections

An InfoPath form being submitted to a database

Include external files as resource files in your form  When you create a data connection in your form, it's better to include external files as resource files directly in your form whenever possible. Resource files can include the HTML pages that make up a custom task pane or the Extensible Markup Language (XML) (Extensible Markup Language (XML): A condensed form of Standard Generalized Markup Language (SGML) that enables developers to create customized tags that offer flexibility in organizing and presenting information.) document that provides the list items for a drop-down list box. When you include resource files directly in the form, your users can access the data in the external files without needing access to an external location. This means that they can fill out forms while they are offline.

Publish forms to the same domain as their data sources   If your form has a primary or secondary data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.) that is in a different domain from the location where the form is published, your users will be warned about allowing cross-domain data access when they open the form. To avoid displaying these types of messages to your users, publish the form to the same domain as the form's data sources.

Creating fully trusted forms

To access system resources, forms must be digitally signed or installed directly on users' computers   Forms that are allowed full access to system resources are called fully trusted forms. Fully trusted forms must be digitally signed by a trusted certificate before you publish the form using the Publishing Wizard. Alternatively, fully trusted forms can be installed by your users, which means that the form template must be packaged using an installation program such as Microsoft Windows® Installer. When you deploy a fully trusted form that users need to install, you are actually deploying an executable file that your users must install directly on their computers before they can fill out the form. You can deploy this file in the same way that you deploy any other program, including sending it as an attachment in an e-mail message. However, if you update the form template after deploying it, you need to repackage and redeploy the form template in order to share the changes with your users.

Enable trusted forms on users' computers  When creating fully trusted forms, you must make sure that your users haven't disabled the ability to fill out trusted forms on their computers. If form trusting is disabled, users will not be able to fill out forms that require access to their computers' resources. To enable trusted forms, click Options on the Tools menu, and then on the General tab, select the Allow fully trusted forms to have access to files and settings on my computer check box.

Updating published forms

Move a form by republishing  If you want to update the location of a published form, open it in InfoPath, and then republish the form to the new location. If you do not use InfoPath to move a published form to a new location, you can cause errors that prevent users from opening the form.

Upgrade existing forms when you modify the form template  When you modify a form template, the existing forms that are based on it may need to be upgraded so that they are compatible with the new version of the form template. This ensures that users can continue to work with those existing forms. To upgrade existing forms, click Form Options on the Tools menu, click the Advanced tab, and then click the option you want in the On version upgrade box.

Test changes to form templates by using existing forms  When you make changes to a published form template, you should verify that the changes you make don't introduce errors into existing forms that are based on that form template. To preview an existing form with its modified form template, point to Preview Form on the File menu, click With Data File, and then open an existing form.

advertisement