570 18.3 Introduction to InfoPath 2007
18.3 Introduction to InfoPath 2007
Microsoft Office InfoPath 2007 is the application to use to develop
browser-enabled form templates that can be deployed to InfoPath Forms
Services. InfoPath 2007 provides a rich user interface that is intuitive to
most people already familiar with Microsoft development tools, such as
Microsoft Visual Studio 2005 or even Microsoft Office InfoPath 2003. In
addition to designing form templates, InfoPath 2007 can be used to create
new instances of forms and update existing forms. If a user has InfoPath
2007 installed on his or her machine and launches a browser-enabled Info-
Path form from SharePoint, the form opens by default in the InfoPath 2007
client; this behavior can be changed by the designer. Updates made to the
form are then saved back to SharePoint, demonstrating the integration capa-
bilities between the two products.
18.3.1 What is a Form Template?
Before we proceed any further, let’s expand upon our earlier definition of a
form template. An InfoPath form template is a basically a cabinet (CAB) file
with a .xsn file extension; in fact, if you rename an InfoPath .xsn file with a
.cab extension, you will be able to examine the files and components that
comprise the template. Figure 18.7 shows the contents of a sample form tem-
plate that has been published to Forms Services and contains multiple views.
The manifest.xsf contains the form definition, which is automatically created
and maintained by InfoPath and contains all the information about the form
template, such as the location of all the files and resources associated with the
template. Other files and information contained in the cabinet file include a
collection of data, views, and resources, and a schema file. A form template is
associated with a core data source, such as a SharePoint list, that stores the
data entered onto the form by the user. Additional data sources can be associ-
Select the location to use for storing form
session state:
Form view (reduces database load on
server).
Default=disabled + session state size =
40kb
Determines whether to use the Form
View (ASP.NET view state) to store the
session state information for the form ses-
sion.
If form session state is larger than the
specified value, the Session State Service
will be used instead.
Table 18.1 Forms Services Configuration Settings (continued)
Setting Description
18.3 Introduction to InfoPath 2007 571
Chapter 18
ated with the form to help populate various components, such as a drop-
down list box. A form template contains at least one visual representation of
the form data, known as a view. When designing your forms, you may need
to provide different views of your form to different users. For example, you
may have views that represent different languages or that provide some users
with a subset of data and others with a more elaborate view of the data.
Views are basically XSL files associated with the form. In addition to the
views, data, and schema files, you can associate resources with a form. A
resource is content that you would like added to the form, such as images or
picture files.
18.3.2 Form Template Designer
The template designer (Figure 18.8) provides the form designer with a set of
design tasks that map to design task panes containing tools to help build the
form templates. The design tasks provide a basic high-level task list for the
types of activities a typical designer will perform during the template design
phase. The first task is to design the layout and the basic structure that the
form template will adopt, such as adding tables, columns, and rows. The
next step involves adding the appropriate controls to the template, such as
text boxes, list boxes, and buttons. After the controls have been added, the
designer then checks to make sure all the required mappings with the data
source are in place, such as mapping the InfoPath fields to the appropriate
site columns in SharePoint. Once the fields have been mapped, the designer
can move on to create any additional views required by the form. When the
designer is happy with the form template design, he or she then checks the
template for potential problems or inconsistencies prior to deployment of the
form. This functionality is achieved using the Design Checker. When design-
ing browser-enabled form templates, you can configure the browser compati-
bility settings with the URL of a server running Forms Services to verify the
compatibility of your template. This setting enables the Design Checker
options, which allow you to select the type of messages you wish the Design
Checker to display. For example, the Show browser compatibility messages
setting, when enabled, highlights any inconsistencies that it finds with Forms
Figure 18.7
XSN file contents.

Get Microsoft SharePoint 2007 Technologies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.