1. Microsoft Virtual Labs
®
Building InfoPath Forms that Run
as Both Rich Client and Browser
Applications
2. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Table of Contents
Building InfoPath Forms that Run as Both Rich Client and Browser Applications .............. 1
Exercise 1 Developing Forms for Rich Client and Browser Scenarios .........................................................................2
Conclusion .....................................................................................................................................................................7
3. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Building InfoPath Forms that Run as Both
Rich Client and Browser Applications
After completing this lab, you will be better able to:
Objectives The objective of this lab is to become familiar with browser-based scenarios
for Office InfoPath 2007 forms.
The lab exercises are as follows:
Scenario • Developing Forms for Rich Client and Browser Scenarios
• Deploying Managed-Code Form Solutions for Browser Scenarios
Estimated Time to 90 Minutes
Complete This Lab
LITWAREINC
Computer used in this Lab
Page 1 of 7
4. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Exercise 1
Developing Forms for Rich Client and Browser Scenarios
Scenario
The 2007 Microsoft Office system servers provide a technology to enable InfoPath forms to be filled in through a
browser interface. This capability is built upon the Microsoft Windows SharePoint Services platform. When
developers publish Office InfoPath 2007 form templates to the server, these templates are converted into Web-
enabled form templates.
The result is that end users can now fill out, view, or save form data without having Office InfoPath 2007 installed
on their computer. For scenarios where both rich client and Web-based use is needed, the corresponding form
templates are designed only once. This “design once” concept means developers can create a single form that will
work on both the client and server.
In this exercise, you will make a form template compatible with 2007 release servers and then publish that form
template to a SharePoint document library. The goal of this exercise is to learn how to check for server
compatibility, review the different server-specific options, and publish form templates for both rich client and
browser scenarios.
Tasks Detailed Steps
Complete the following 5 Note: Login using the following credentials:
tasks on: Username: administrator
Password: pass@word1
LITWAREINC Log on to: LITWAREINC
1. Using Design Note: You will start a design session for an existing status report form template and
Checker use the Design Checker to identify design or compatibility issues with the form.
a. Open Windows Explorer.
b. Navigate to C:HOLInfoPathFormsWithServerExercise1.
c. Right-click StatusReport.xsn and select the Design menu command.
d. In the Design Tasks task pane, click Design Checker.
Note: The status report form template has already been designed for client
compatibility, and there are no errors or warnings in the Design Checker. However,
this form is eventually going to be published to a SharePoint document library so it
can be accessed by users that do not have Office InfoPath 2007 installed. As a result,
the Design Checker will be needed to see if the form template is compatible with
Office Forms Server as well.
e. In the Design Checker task pane, click Change compatibility settings.
f. In the Compatibility tab of the Form Options dialog box, select the Design a
form which can run in a browser or InfoPath checkbox.
g. Click OK.
Note: There are three compatibility errors listed in the Design Checker task pane.
Note: The errors listed in the Design Checker task pane refer to the Last Period, This
Period, and Issues optional sections. You can get additional information about an
error by clicking it in the Design Checker. If you click the first error, you will note
that the bulleted list control is not supported in server forms. Each of the optional
sections in the form view contains a bulleted list control, and you will change these
three bulleted list controls to repeating table controls.
h. In the form view, right-click the bulleted list control in the Last Period
sectioselect the Change To | Repeating Table menu command.
Page 2 of 7
5. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Tasks Detailed Steps
i. Right-click at the end of the word Item within the header row of the repeating
table control.
j. Select the Delete | Rows menu command.
k. Repeat the three previous steps for the bulleted list controls in the This Period and
Issues sections. The three optional sections in the form view should appear as
shown
l. In the Design Checker task pane, click Refresh.
Note: There are no errors or warnings listed in the Design Checker task pane.
2. Modifying Server- Note: Now that the status report form template has been designed for both client and
Specific options server compatibility, you will modify some server-specific options before publishing to
a SharePoint document library.
Note: When you modify the form template to be compatible with Microsoft Office
system servers, a new Server Forms category is available in the Form Options dialog
box. This category gives the developer some toolbar, data-refresh, and language
options for forms that run in a Web browser. Commands listed can be made available
on the toolbar of the browser-based form. Table 9.1 provides a brief description of all
the toolbar commands.
Table 9.1 Server Form Toolbar Commands
Command Description
Page 3 of 7
6. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Tasks Detailed Steps
Submit Uses the form’s submit
functionality
Print View Previews the current view of the
form as a print view
Save Saves the form to the document
library or the specified save
location
Save As Saves the form to the document
library or the specified save
location, with a different name
Close Closes the form
Save Draft Downloads the form to the local
machine
Open Draft Uploads a saved draft to the
server
Views Switches views in the form, if
there are multiple views
Refresh Refreshes the form data with
the server
a. Select the Tools | Form Options menu command.
b. In the Form Options dialog box, click the Browser category.
c. Clear the Show toolbar at bottom of form check box.
d. Clear the Print View check box.
e. Clear the Views check box. The Form Options dialog box should now appear as
shown
Page 4 of 7
7. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Tasks Detailed Steps
Note: If you clear the toolbar top and bottom check box options, you will not be able
to save the form template to the SharePoint document library.
f. Click on the Property Promotion category, click Add.
g. In the Select a Field or Group dialog box, expand the UserInformation group
and double-click Region.
h. Click OK.
3. Publishing, the status Note: You will now publish the status report form template and enable it through the
report form template. form management in the Central Administration area. This is a required step when a
form requires full trust and you wish to browser-enable the form.
a. Select the File | Publish menu command.
Note: If prompted to save select OK to continue.
b. In the first page of the Publishing Wizard, click To a network location and click
Next.
c. Click Browse and select Desktop, ensure that the File Name is StatusReport.xsn
and click OK.
d. Ensure that the Form template name is StatusReport and click Next.
e. In the next page of the Publishing Wizard, clear the text box and click Next.
f. In the next page of the Publishing Wizard, click on the Publish button.
g. The Publishing Wizard will inform you that your template has been successfully
published, click Close.
h. Close InfoPath 2007.
4. Uploading the form Note: With Office Server 2007 in order to web-enable a fully trusted InfoPath form
template. you must upload the Form Template in to the Central Administration area and
activate it as a content type on a site collection.
a. Open Internet Explorer and click on the Central Administration favorites link.
Page 5 of 7
8. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Tasks Detailed Steps
b. Click on the Application Management link, and then click on the Upload form
template link in the InfoPath Forms Services section.
c. Click on the Browse button, navigate to the Desktop
d. Select your StatusReport.xsn, click Open and then click Upload.
e. You are now on the Upload Form Template page, click OK.
f. Hover over the StatusReport.xsn in the Manage Form Templates list and select
the Activate to a Site Collection.
g. By default http://moss.litwareinc.com should be selected, click the OK button.
h. In Internet Explorer type http://moss.litwareinc.com/status%20report in the
Location and press Enter.
i. Click on Settings and select the Form Library Settings.
j. Click on the Advanced Settings link and select Yes in the Allow management of
content types, click OK..
k. In the Content Types section click on the Add from existing site content types
link.
l. Select StatusReport from the Available Site Content Types list, click Add and
then click OK.
m. Click on the Form content type in the Content Types section.
n. Click on the Delete this content type link under Settings, click OK to confirm
delete.
5. Viewing the report Note: With Office InfoPath 2007 installed on the lab machine, you will not be able to
through Browser. run the status report from the document library as a browser form because the Office
InfoPath 2007 client experience, if available, is always the default. Instead, you will
navigate to a specific URL to instruct Internet Explorer to open the form in the
browser. Once the form template is opened in the browser, you will enter data and
then submit the form to the document library. Then, you will navigate to the document
library and confirm that your form data has been saved properly.
a. In Internet Explorer, navigate to http://moss.litwareinc.com/status%20report.
b. Click the New | New Status Report button, and select the Trsut all documents
from this publisher option in the security dialog if prompted.
c. In the Sales Representative field, type Rob Caron.
d. In the Employee ID field, type 1234.
Note: (Optional) Type sample data in the other fields of the status report form.
e. Click Submit.
f. In the Microsoft Internet Explorer dialog box, click OK.
g. Navigate to http://moss.litwareinc.com/status%20report.
h. In the Status Report document library, click Rob Caron.
Note: The data you entered appears in the InfoPath form file.
i. To see the web-enabled form click on the Settings, and then click on Form
Library Settings.
j. Click on the Advanced Settings link, select the Display as a Web page radio
button in the Opening browser-enabled documents section.
k. Click OK, repeat the instructions for filling out the form data by navigating to
http://moss.litwareinc.com/status%20report.
l. For the Sales Representative field, type Willis Johnson.
Page 6 of 7
9. Building InfoPath Forms that Run as Both Rich Client and Browser Applications
Conclusion
Microsoft Office Forms Server 2007 offers developers the ability to support Office InfoPath 2007 forms that run as
both rich client and reach applications. Codeless forms can be published directly to a SharePoint site using the
InfoPath Publishing Wizard. For form templates that use managed code or require full trust, server administrators
can deploy these templates to a library using SharePoint 3.0 Central Administration.
Page 7 of 7