6. Microsoft InfoPath
Microsoft introduced InfoPath in Office 2003
as an application to visually create forms and deploy them to an
audience to fill out. As a stand-alone Office application, InfoPath
provides good form design capabilities, and the author of a form has
various deployment options.
In 2007, Microsoft Office SharePoint Server (MOSS) 2007
included InfoPath Server as an Enterprise license feature. The purpose
of InfoPath Server was to render forms, designed in InfoPath, within
the SharePoint environment, to users with a web browser. InfoPath 2007
included the new SharePoint InfoPath Server deployment path.
The problem with InfoPath Server in MOSS 2007
was that the expectation from Microsoft that InfoPath Server would
provide site designers the overarching solution for integrating custom
forms into the SharePoint platform missed the mark. InfoPath Server
came to SharePoint as an additional feature and did not fully integrate
into the platform, and so InfoPath-hosted forms in MOSS 2007 looked
more like an afterthought.
Since SharePoint 2010, InfoPath and SharePoint
now fully integrate. For example, SharePoint 2013 allows administrators
to customize any list-based form, via SharePoint Designer 2013, which
consists of converting the form to an InfoPath form. Most of the
annoying branding that informed the user that InfoPath Server was
powering the form rendering is gone, and forms render within the same
SharePoint site chrome.
The InfoPath 2013 Office application itself is in two parts: Designer and Filler.
You use the Designer part of the application for designing and
deploying new forms, and the Filler for users to complete forms. Form
designers may deploy both browser-based forms and those that are not
browser based to SharePoint. Forms that are browser based and sourced
from a form library with setting to render InfoPath forms in the
browser will do so. Forms that are not browser based or those sourced
from a forms library that does not permit browser rendering will open
InfoPath Filler on the client desktop.
SharePoint supports three deployment options for browser-based InfoPath forms, as follows:
- Form Library: A SharePoint Form Library is a special type of
document library that contains XSN files—the XML definition of an
InfoPath form. Form Libraries work well when deploying forms to a
single location at the current site level and when the form creator has
no expectation of hosting the form in other sites or libraries.
- Site Content Type: Forms may now deploy as content types in
SharePoint to the site or site collection Content Type Gallery. This
method supports reuse of the form across sites and libraries in the
hierarchy.
- Administrator-approved Form Template: This type of form
deployment involves deploying the form to the InfoPath Forms Services
application in the farm (via Central Admin). Administrator-approved
forms are reusable across the farm as templates wherever the farm has
access to the InfoPath Forms Services.
Before you dive into the various deployments of
InfoPath forms and see InfoPath Forms Services in action, you must
first configure InfoPath Forms Services, via Central Admin.
- Open Central Administration.
- Click the General Application Settings heading.
- Click the Configure InfoPath Forms Services link, under the InfoPath Forms Services heading.
- SharePoint shows a page like that in Figure 19.
Most of the settings on this page are self-explanatory. The User Browser-enabled Form Templates are specifically of interest because unchecking these options prevents browser-based forms from rendering in the browser.
- Go back to the General Application Settings page and review the various links under the InfoPath Forms Services heading:
- Manage form templates: Navigates the administrator to the
master form templates list. By default, this list contains forms for
use in various workflows across the farm.
- Configure InfoPath Forms Services: As described previously,
this link takes the administrator to a page to configure the general
settings for InfoPath Forms Services.
- Upload form template: Provides a page where the administrator can upload an administrator-approved form to the master list.
- Manage data connection files: InfoPath forms typically use
data connection files to define how to integrate data into the form
(such as for drop-down list values) and where to submit posted data.
This link provides the administrator with a place to upload and manage
data connection files.
- Configure InfoPath Forms Services Web Service Proxy: Allows the administrator to enable a web service proxy for forms.
Deploying a Form Via Central Administration
Forms deployed to
Central Admin by administrators are available for use by other users in
designated site collections. The following steps detail how to upload
an InfoPath template (XSN file) to Central Administration:
- Open Central Administration.
- Click the General Application Settings heading.
- Under the InfoPath Forms Services heading, click the Upload Form Template link.
- Browse to the location of the XSN on disk.
- You may click the Verify button to confirm that the form has no errors (I recommend doing this).
- Click the Upload button and then look to the Status page, which should read success.
- From the Manage Form Templates page, hover over the name of the form template you just uploaded.
- Click the Activate to a Site Collection link.
- Choose a site collection to activate the form; after completing
this step, SharePoint makes the form available as a content type in the
Content Type Gallery, for users to add to new and existing
lists/libraries.
Rendering a Form Using the InfoPath Form Web Part
SharePoint 2007 used to
render forms in a new browser window executed by SharePoint, or site
designers could host InfoPath forms in a Forms Server User Control.
Neither option was particularly compelling. SharePoint now provides an
InfoPath Web Part.
The InfoPath Web Part allows any page
contributor to host an existing InfoPath form on pages that support Web
Parts, such as wiki pages and pages with Web Part zones. After
inserting the Web Part on the page, you should see something like Figure 20. Click the link to show the tool pane and follow these steps to configure the Web Part to an existing InfoPath form:
- The list or library drop-down control contains all lists and
libraries using InfoPath form content types. Select the desired list to
render the form.
- Select the appropriate InfoPath form content type in the next drop-down control.
- The check box Show InfoPath Ribbon or Toolbar instructs the Web
Part to display the InfoPath ribbon in the Web Part rendering.
Unchecking this option will cause the Web Part to render only the form
(which is often desirable for end users).
- The check box Send Data to Connected Web Parts When Page Loads
instructs the Web Part to activate any Web Part connections during page
load.
- The remaining controls pertain to rendering, such as the default view to render and what happens to the form after submission.
- Click the OK button at the bottom of the tool pane to save your changes.