Learn how to create a browser-enabled InfoPath 2007 form template, review the different server-specific options, and publish the form template to an Office SharePoint Server 2007 document library. (5 printed pages)
Applies to: Microsoft Office InfoPath 2007
Download: InfoPath 2007 Sample: Training Labs.
After completing this lab, you will be familiar with the following:
The Design Checker task pane
Server-specific form options
Publishing a form template to a server running InfoPath Forms Services
Lab Setup and Requirements
To complete this lab, you must have the following:
Microsoft Office InfoPath 2007
Access to an Microsoft Office SharePoint Server 2007 or Microsoft Office Forms Server 2007 server as a Farm Administrator
Access to a site collection
The IT department at Contoso has designed a status report form template using Office InfoPath 2007. They are now ready to publish the form template to a server so that users who do not have Office InfoPath 2007 installed on their computer can access the form using a Web browser. Before proceeding, the form designer must prepare the form template for the server, modify the server-specific options, and then publish the form template to the server.
Publishing a Form Template to a SharePoint Server Library
One way to share a form template with other people in your organization is to publish it to a SharePoint Server library. This allows team members to fill out, save, and view the status report, regardless of whether they have Office InfoPath 2007 installed on their computers. In the following exercise, you will publish the status report form template to a document library created specifically for this use.
To open the form template
In the Getting Started dialog box, click Design a Form Template.
In the Design a Form Template dialog box, click On My Computer.
Select the Status Report (Simple) form template contained in the download associated with this lab, and located in the C:\2007 Office System Developer Resources\Code Samples\InfoPath2007SampleTrainingLabs folder, and then click Open.
The Contoso status report form opens in design mode.
Save the Status Report (Simple) form template on the desktop, and use this copy to publish to a SharePoint Server library.
To ensure that the form template is compatible with the server
Click the drop-down arrow at the top of the Design Tasks task pane, and then click Design Checker, as shown in Figure 1.
Figure 1. Opening the Design Checker task pane
On the Design Checker task pane, click Change Compatibility Settings.
In the Form Options dialog box, check Design a form template that can be opened in a browser or InfoPath, and then click OK.
Review any errors or warnings that appear in the Design Checker task pane list, as shown in Figure 2.
To learn more about an individual error, select it in the list.
There are no errors in the status report form template that prevent the form from working in the browser.
Figure 2. Viewing compatibility errors
When all errors have been addressed, the form template is ready to be published to the server. However, you may want to specify any server-specific options before you publish the form template. For example, you can modify the toolbars that appear above and below the form in the browser. By default, both toolbars are available on the form when it is being filled out in the browser, but you can choose to show the top toolbar only, the bottom toolbar only, or no toolbars at all.
To change server-specific options
On the Tools menu, click Form Options.
In the Form Options dialog box, click Browser in the Category list.
To disable the toolbar on the top of the form, clear the Show toolbar at top of form check box.
To disable the toolbar on the bottom of the form, clear the Show toolbar at bottom of form check box.
If you remove both toolbars, you will not be able to save the form template to the document library.
To change the language of the interface elements, such as toolbars and dialog boxes, select the language you want from the Form language list.
By default, the form language is based on the language that the form was designed in. The language selected should be one of the server-supported languages and should be installed on the server.
Table 1 describes the buttons that are available on the toolbar. By default, all the buttons are available.
Table 1. Toolbar buttons
Begins the submission process if submit has been enabled for the form template.
Saves the form to the document library or to the specified save location.
Saves the current form to the document library or to the specified save location with a different form name.
Closes the current form.
Used to switch between views if more than one view of the form template is available.
If you do not want users to switch between views directly from the toolbar, disable this button.
Switches to a view with a layout for browser printing.
Updates the form data with the server. This button will trigger any server-related actions associated with this form.
To disable one of the buttons, clear the check box next to the button you want to disable, as shown in Figure 3.
You can change the captions of the buttons by editing the solution manifest (.xsf) file.
Figure 3. Setting server-specific form options
After you specify the appropriate server-specific options, you are ready to publish the form template to the document library.
To publish a form template to a library
On the File menu, click Publish.
On the second page of the Publishing Wizard, click To a SharePoint server with or without InfoPath Forms Services, and then click Next.
In the Enter the location of your SharePoint or InfoPath Forms Services site box, type the name of your site, and then click Next.
On the next page of the wizard, ensure that Enable this form to be filled out by using a browser is checked at the top of the page.
Click Document Library, and then click Next.
Click Create a new document library, and then click Next.
In the Name box, type Status Report Simple, and then click Next.
Click Add to add a SharePoint column.
In the Select a Field or Group dialog box, select the Date field.
In the Column name box, replace Date with Status Report Date, and then click OK.
This text will appear at the top of the column in the SharePoint Server library.
Repeat steps 8, 9, and 10 to add more columns to the document library. When finished, click Next.
To complete the wizard, click Publish.
The final page of the wizard indicates that the form was successfully published. This page contains a link to preview the form in the default browser.
To open the published form
Browse to the SharePoint Server library.
On the document library toolbar, click New.
If Office InfoPath 2007 is installed, the form is opened in InfoPath. If Office InfoPath 2007 is not installed, the form is opened in the browser.
To make the form open only in the browser
Browse to the SharePoint Server library.
On the document library toolbar, click Settings, and then click Form Library Settings.
In the General Settings section, click the Advanced Settings link.
In the Browser-enabled Documents section of the Form Library Advanced Settings page, as shown in the following, select the Display as Web page option.
Figure 4. Change the option to always open in the browser
Click OK, and browse back to the SharePoint Server library.
Now the form will always be opened in the browser, regardless of whether Office InfoPath 2007 is installed.
Now that you have completed this lab, you can prepare a form template for publishing to a server, set server-specific options that will appear on the form when it is opened in a Web browser, and publish the form template in a SharePoint Server library.
To learn how to deploy a form template to a server running InfoPath Forms Services, see Lab 2: Deploying and Managing InfoPath 2007 Forms.