578 18.5 Creating a Browser-Enabled Form Template
DCL can be either a link type that is relative to the site collection or a link
type that connects to the centrally managed connection library. The link type
you select depends on the type of data connection you are implementing. For
example, if you use a relative link, it means that the DCL is not dependent
on the site collection. This is an advantage from a portability perspective, as
it allows you to deploy your form templates to other site collections as long as
that site collection has a DCL with the same name containing a UDC file of
the same name. If you need to share a data connection across multiple site
collections but some of the connection settings, such as the authentication
settings, differ depending on the site collection, the site relative link would
be ideal. If, on the other hand, you need to share the same data connection
across multiple site collections, with no change in the data connection infor-
mation between site collections, then using the relative link would result in a
lot of unnecessary duplicate data connections across the server farm. A better
solution in that instance would be to use the centrally managed connection
library, which is accessible from the Application Management page in the
central administration Web site.
The centrally managed connection library is managed and maintained
by the administrator and provides a central repository for storing data con-
nection files. Data connections defined in the central library have more flex-
ibility than those stored in a site collection DCL. For example, cross-
domain data connections defined in the centrally managed connection
library can be leveraged by form templates without requiring the form tem-
plate to be fully trusted. Another advantage is that data connections defined
in the centrally managed library are accessible to all site collections across
the entire server farm.
While storing data connections in a centrally managed library has many
advantages, it does come with some administrative overhead. Only adminis-
trators can add data connections to the centrally managed library, and form
templates that reference connections in the centrally managed library must
be deployed by an administrator. While these constraints may sound cum-
bersome from a development perspective and do require more coordination,
they actually protect the security of your form templates because you do not
need to make your form templates fully trusted unless absolutely necessary.
Another benefit is that, by default, users who have been granted the contrib-
utor role in SharePoint can upload data connection files to a DCL, whereas
only farm administrators can upload data connection files to the centrally
managed library.
18.5 Creating a Browser-Enabled Form Template
Now that we have reviewed the various capabilities offered by InfoPath
Forms Services and InfoPath 2007, lets run through a quick example of cre-
18.5 Creating a Browser-Enabled Form Template 579
Chapter 18
ating a form template In this example, we’ll create a simple form (Figure
18.15) that captures the name of the user and his or her hobbies, favorite
color, favorite food, and favorite drink. The fields will map to site columns in
SharePoint, and the choices for the favorite lists will be pulled directly from
lists in SharePoint, thereby demonstrating the use of data connections.
Preparatory steps
Before we begin the exercise, there are a number of preparatory steps that you
need to perform:
1. Launch SharePoint Server 2007 and create a new Team site.
2. From the Site Actions menu in the newly created Team site, click
Create.
3. From the Libraries section, click Data Connection Library to cre-
ate a new DCL.
4. Name the DCL MyConnections.
5. In the same Team site, create three custom lists named Color,
Drink, and Food.
6. Populate each of these lists with data of your choosing.
7. From the Site Actions menu, click Site Settings.
8. From the Galleries section, click Site columns.
9. Create three new site columns of type single line of text: Color,
Drink, and Food.
Step 1: Create the form template layout
1. Launch Microsoft Office InfoPath 2007. The Getting Started
dialog should appear.
2. From the Design a Form section, click Design a Form Template.
The Design a Form Template dialog appears.
3. In the Design a New section of this dialog, ensure that the Form
Template option is selected, the Blank template is selected, and
the Enable browser-compatible features only setting is checked.
4. Click OK. The new blank form template should open in design
mode.
5. From the Design Tasks task pane on the right of the user inter-
face, click the Layout task.
6. From the Insert Layout Tables section, click Table with Title.

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.