SharePoint content types and InfoPath forms overview
Get a quick overview of content types in SharePoint, the benefits of using SharePoint content types, and their usage with InfoPath forms.
A content type, as the name suggests, is a particular type of content in SharePoint.
A content type defines metadata and behavior for a certain piece of data in SharePoint, which is usually a document, but which can also be an item or in the case of InfoPath, forms.
What do SharePoint content types allow you do to with InfoPath forms?
The benefits of using content types with InfoPath forms include:
- Being able to use different types of InfoPath forms to create different types of items in one SharePoint list.
- Being able to create different types of InfoPath forms in one SharePoint form library.
- Being able to run a SharePoint workflow on specific types of InfoPath forms.
Creating and using SharePoint site content types
Content types follow a hierarchical structure in SharePoint, meaning that a content type inherits properties and behavior from a parent content type.
Base content types are created when you first create a SharePoint site collection. You can use these content types as parent content types of your own custom content types. You can see the list of SharePoint site content types that is created by clicking on the Site content types link that is located on the Site Settings page under Web Designer Galleries in SharePoint 2013.
On the Site Content Types page in SharePoint, you will find several categories or groups of content types. And behind each content type, in the Source column, you will see the name of the site listed on which that site content type was created.
On the Site Content Types page, you will also find a Create command with which you can create a custom SharePoint site content type. When you create a custom content type, it becomes available on the site where you create it and on all of the subsites under that site. So content types become available down the chain of sites (not up the chain).
After you have created a custom content type, you can add columns, site columns in this case, to the content type, just like you would after creating a SharePoint list, a SharePoint document library, or a SharePoint form library. You can also add workflows to them and configure among other settings, their document templates for creating certain types of documents or content in SharePoint.
After you have created and configured a SharePoint site content type, you must associate it with a SharePoint list or library before you can use it to create documents, items, forms, etc.
One of the big benefits of using content types is that you can add more than one content type to a SharePoint list or library to be able to create different types of content in one SharePoint list or library. This also applies to InfoPath forms after you have added one or more SharePoint site content types to a SharePoint form library.
Creating SharePoint site content types for InfoPath forms
Where InfoPath forms are concerned, you can manually create a SharePoint content type for use with InfoPath forms, or you can publish an InfoPath form template from within InfoPath Designer 2013 and let InfoPath create a new site content type in SharePoint that can be used to create InfoPath forms. The latter is the easiest way of creating a SharePoint site content type for InfoPath forms.
For more information about creating content types for InfoPath, see recipe 25 and recipe 26 of InfoPath 2013 Cookbook 2, which show you how to create SharePoint site content types using the two aforementioned methods.
One thing you must not forget is that whether you publish an InfoPath form template directly to a SharePoint form library or not, a content type is always created for it in SharePoint. What this boils down to is: It does not matter which form template publishing method you choose in InfoPath Designer 2013, because the InfoPath form template you publish will always be associated with a content type in SharePoint.
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.