About forms in SharePoint Server 2010
Published: May 12, 2010
In this article, you will learn about the benefits of using InfoPath forms to gather data in Microsoft SharePoint Server 2010 solutions. It describes the role of forms in broader business solutions, and the types of forms you can create by using Microsoft InfoPath 2010.
In this article:
InfoPath forms overview
All business processes involve gathering data of some kind, and the success of any business process relies on the quality and integrity of that data. By using InfoPath forms in your SharePoint solutions, you can ensure that only valid, good quality data is gathered. InfoPath 2010 achieves this by letting you standardize, customize, and optimize the process of gathering data without writing any code.
The following are some key features that InfoPath provides to ensure data integrity:
Custom data validation ensures that users cannot submit forms that contain invalid data.
Customized layout. By using multiple views, you can simplify the form-filling experience by splitting forms into multiple pages or creating separate views that are optimized for specific users or tasks. Conditional formatting lets you optimize the form-filling experience. For example, you can show or hide fields in the form based on values entered by users.
Data connections to other sources such as SharePoint lists or Web services let you pull supporting, contextual data into your forms.
InfoPath Forms Services accesses external data sources by using a delegated Windows identity. Consequently, external data sources must reside within the same domain as the SharePoint Server 2010 farm, or InfoPath form templates must be configured to use the Secure Store Service. If the Secure Store Service is not used and external data sources do not reside within the same domain, authentication to the external data sources will fail. For more information, see Planning considerations for services that access external data sources in “Services Architecture Planning.”
Code is not required to implement the above features. However, you can write managed code by using Visual Studio Tools for Applications (VSTA) to add more advanced functionality to your forms.
Role of forms in SharePoint solutions
Forms play a role in all business process management solutions. The following are just a few examples of the types of business solutions and applications that use InfoPath forms:
Form-driven applications start with a form that is used to gather data and add in other SharePoint functionality to process and report on the data including workflows, reporting, custom Web Pages, and external lists. Examples include a help desk Web site, a procurement center, or an employee hiring center for a human resources department.
Document workflow applications automate document-based business processes. Adding InfoPath forms to workflows lets you gather information from the users at predefined times in the life of the workflow and let users interact with the tasks for that workflow. Examples include contract approval, technical specification review, or processing for legal documents.
Business data applications start with data in an external system that is made available in SharePoint Server through Business Connectivity Services. Data in the external systems is accessible in SharePoint Server through external lists and can be added, viewed, updated, and deleted by using InfoPath forms. Examples include customer relationship management and enterprise resource planning.
Ad hoc business processes can be managed by using SharePoint lists. The forms used for creating, reading, and updating items in these lists can be customized by using InfoPath 2010. Examples include simple issue tracking or tasks lists.
Document information panels use InfoPath forms to display document metadata within the Microsoft Office system client application.
Types of InfoPath forms
Depending upon an organization and its business resources and needs, form designers can be professionals dedicated to forms-based design and development, or other users such as information workers, overall solution designers, site designers, site collection administrators, Web developers, or farm administrators who have other primary responsibilities.
The type of form they design will depend on the requirements of the business solution.
InfoPath consists of the following two main components:
InfoPath 2010 is the Office system client application that has the following two modes:
Microsoft InfoPath Designer 2010 is used to create form templates. Form templates define the data structure, appearance, and behavior of a form. After the design process has been completed, form designers publish the form template to SharePoint Server so that users can start filling out forms based on that template.
Microsoft InfoPath Filler 2010 is used to fill out forms that are based on form templates created in InfoPath Designer.
InfoPath Forms Services in Microsoft SharePoint Server 2010 enables forms to be rendered in the Web browser. It is available as an Enterprise feature of SharePoint Server 2010. Farm administrators configure settings for InfoPath Forms Services on the SharePoint Central Administration Web site.
Web browser vs. Filler-only forms
The first design decision that form designers have to make is whether to create a Web browser form or a Filler-only form. Browser forms can be filled out in a Web browser, whereas Filler-only forms can only be filled out in InfoPath Filler 2010.
The major benefit of creating browser forms is that users who fill out the forms do not have to have InfoPath 2010 installed on their computers. These forms can be filled out in the browser. InfoPath Forms Services is required to publish browser forms to SharePoint Server and to render them in the browser. However, it is important to note that certain functionality and controls are not supported in Web browser forms. This is the most common reason for creating a Filler-only form.
Web browser forms
Browser forms include the following types:
External list forms
Form library forms
SharePoint list forms
New in SharePoint Server 2010, you can now extend and enhance the forms used for creating, editing and viewing items in SharePoint lists by using InfoPath 2010. InfoPath form templates that are published to SharePoint lists replace the default SharePoint list form.
Each content type for the list has its own SharePoint list form that can be customized in InfoPath Designer.
By customizing list forms in InfoPath Designer, you can enhance your SharePoint lists by adding the following functionality that is not supported in default SharePoint list forms:
Add rules to validate data that users add to forms. For example, if you are using forms to track orders for an organization, you can enforce a spending limit for individual orders.
Add rules to format data based on particular conditions. Form designers can show or hide fields, enable or disable controls, switch views, or set values for data in a field. For example, in an inventory-tracking form template, you can show different information to a user who requests new inventory than to the organizational administrator who purchases new inventory.
Query data from other sources. For example, you can check the availability of inventory in an external system and let users know immediately if a particular item is unavailable.
Change the layout and appearance of forms. For example, you could move the required fields to a prominent position in the form to make them easier for users to find and fill out, or add views that are optimized for different tasks or user permissions.
These customization options and the built-in views and filtering options available for SharePoint lists enable list forms to be used in many kinds of business solutions, from ad hoc processes to more complex, structured business processes.
SharePoint list form templates cannot contain managed code or repeating or nested data. If the overall solution requires managed code or complex data structures in forms, you must use a form library.
External list forms
Business Connectivity Services lets you work with data from external systems such as databases or Web services by using SharePoint external lists. External lists are created from external content types. As for regular SharePoint lists, InfoPath 2010 can be used to customize the forms used to create, read, update and delete items in external lists.
Form library forms
A form library is a SharePoint document library that uses an InfoPath form as its default content type. New forms are created by clicking the New button in the form library and individual forms that are filled out by users are stored as XML files in the library.
Form library forms should be used if your solution requires any of the following features:
Repeating or nested data
Form data stored as XML
Form designers can use InfoPath Designer to customize the forms that users fill out to interact with tasks in SharePoint workflows.
For more information about how to design form templates, see InfoPath Help and How-to (http://go.microsoft.com/fwlink/p/?LinkID=185225).
For more information about how to design form templates that have custom code, see InfoPath Forms Services (http://go.microsoft.com/fwlink/p/?LinkId=185226) in the SharePoint Developer Center.
Publishing options for form library forms depend upon whether the form template contains managed code, the permissions of the form designer, and InfoPath Forms Services settings.
Publishing browser forms without code
Web browser forms that do not contain managed code can be published directly to SharePoint Server by any form designer with the Design permission level. Form designers publish form templates by using InfoPath Designer.
Farm administrators can restrict the ability to publish browser forms to SharePoint Server by disabling the publishing of browser-enabled form templates on the InfoPath Forms Services configuration options page in Central Administration. This option applies to form library forms only, and enables organizations that want more centralized control of form templates to require administrator approval before publishing browser forms to SharePoint Server. This option does not prevent users from publishing Filler-only forms to SharePoint Server. These forms can only be filled out by using InfoPath Filler.
Publishing browser forms with code
Form designers can add managed code to their forms by using Visual Studio Tools for Applications (VSTA). VSTA is an optional installation component available in Setup for InfoPath 2010. Form templates that have managed code can be published in the following two ways:
Sandboxed solutions Site collection administrators can publish form templates that have code to form libraries as sandboxed solutions.
Administrator-approved forms Farm administrators can upload form templates to a library in Central Administration, and then activate the form templates on site collections as site content types that users with the Design permission level can select.
Form templates as sandboxed solutions
Site collection administrators can publish form templates that have code to form libraries as sandboxed solutions, if the Microsoft SharePoint Foundation Sandboxed Code Service is running on the farm. This lets a form designer who is a site collection administrator publish forms without requiring farm administrator approval. The sandboxed solutions will run in an environment that has access to a subset of the server object model. The farm administrator can set usage limits to protect the server from malicious code.
Form templates that contain code that requires full trust to execute cannot be published as sandboxed solutions. They must be approved by a farm administrator. For more information about sandboxed solutions, see Sandboxed solutions overview (SharePoint Server 2010).
Administrator-approved form templates
Farm administrators can upload form templates that have code, including code that requires full trust to execute, to a form template library in Central Administration. This can be a preferred option in organizations that are willing to sacrifice ease of deployment for more centralized control of forms and managed code. Form templates that are uploaded to the form template library in Central Administration are called administrator-approved form templates.
After saving the form template, the form designer contacts the farm administrator. The farm administrator reviews the form template to ensure that it meets organizational performance and security standards. If the form template meets those standards, the farm administrator uploads it to the form template library in Central Administration for the farm.
A farm administrator has to activate a form template for a specific site collection before it can be used on the site collection. Activating a form template puts the form template in a library of form templates for the site. Users can then add the form template as a content type to a form library. Anyone with the Design permission level can add a form template content type.
For more information, see Manage administrator-approved form templates (SharePoint Server 2010).
Filling out forms
After a form template has been published, users can start filling out forms that are based on that form template.
Browser vs. Filler forms
There are two main form-filling environments, the Web browser and InfoPath Filler. Any form can be filled out in InfoPath Filler. Only browser-enabled forms can be filled out in a Web browser.
Farm administrators can disable rendering of forms in the Web browser by configuring settings on the InfoPath Forms Services configuration page in Central Administration. This applies only to user form templates that have been published to form libraries, and not to administrator-approved form templates or form templates published to lists. If rendering of Web browser forms is disabled, forms will open in InfoPath Filler if InfoPath is installed on the user's computer.
SharePoint list forms can be filled out offline by using SharePoint Workspace. Form library forms can be filled out offline by using InfoPath Filler.
InfoPath Form Web Part
InfoPath browser forms can also be hosted on Web pages by using the InfoPath Form Web Part. For more information about the InfoPath Form Web Part, see About the InfoPath Form Web Part (http://go.microsoft.com/fwlink/p/?LinkId=187903&clcid=0x409).