Using InfoPath 2010 with SharePoint 2010 Content Types

There are a couple of ways to integrate Content Types with InfoPath forms libraries. I’m going to cover one scenario, but I’m sure there are more.

My scenario is that I want to submit a form to a SharePoint 2010 Forms library and align the data collected on the form to existing columns in my Content Type. Here’s a summary of the steps:

· Create a Site Content Type in SharePoint 2010 (my example is HR Forms)

· Create a Forms Library in SharePoint 2010 (my example is HR Forms Test)

· Add the Site Content Type to the newly created Forms Library

· Create a new form using InfoPath Designer 2010

· Publish the form to the form library, mapping the fields on the form to the existing columns in the library

That’s it!

Ok, now for some detailed steps:

Create a Site Content Type in SharePoint 2010

Go to the site in SharePoint 2010 where you want to define your Content Type (this will vary based on your requirements). For my example, I’m creating my Content Type in the root of my site collection, which is at http://intranet .

Go to Site Actions menu –> Site Settings –> Site Content Types.

At the top of the list of content types, click the Create link. You should see a page like this:

clip_image002

I’ve already filled in my Name “HR Forms”, selected the parent content type, and selected an existing group. Click Ok to create your Content Type.

You’ll then be returned to the list of content types – look for your newly created content type under the group that you either chose or created.

Once you locate your content type, click on it. This will bring up the Site Content Type Information page, which contains the settings for your content type. You’ll need to add columns to your content type, which is near the bottom of the window.

Once you’ve added some columns, your page should appear something like this:

clip_image004

Now that the content type is ready, we can move onto our next step.

Create a Forms library in SharePoint 2010

To create a Forms library, go to the Site Actions menu, and select “More Options”. A Create window will appear displaying all of the options of things you can create in SharePoint. If you click on the Library filter on the left, the window will only display libraries (as you’d expect). For our scenario, we need a Form library, so click on Form Library and fill in a name for the new library on the right. Your page should look something like this:

clip_image006

Then click Create. You should now see your forms library:

clip_image008

Add the Site Content Type to the newly created Forms Library

Our next step is to finish configuring the forms library (that we created in the previous step). To do so, go to the forms library and click on the “Library” tab in the ribbon at the top of the page. Then click “Library Settings” which will be near the right:

clip_image010

On the Form Library Settings page, you should see General Settings and then a Columns section. However, you won’t see Content Types. First, you’ll need to allow content types to be used with this forms library. To do this, click on the Advanced Settings in the General Settings section.

On the Advanced Settings page, you’ll need to set “Allow management of content types?” from “No” to “Yes”. This is the first setting at the top of the page. There are a lot of options on this page, but you’ll only need to change the first one for our scenario, so change it and click Ok to save your change.

Now, when you return to the Form Library Settings page, you’ll see Content Types immediately below the General Settings section.

clip_image012

Now, click on “Add from existing site content types” in that Content Types section. On the Add Content Types page, find the content type you created and Add it by selecting it and moving it to the “Content types to add” box, and then clicking Ok.

clip_image014

When you return to the Form Library Settings page, you should see your Content Type listed in the Content Types section.

Create a new form using InfoPath Designer 2010

The next step is to create the form in InfoPath. To do this, you’ll need to open InfoPath Designer 2010. When you open InfoPath, it should display the New window (if not, go to the File menu/backstage and select new):

clip_image016

In the new window, select “SharePoint Form Library” and click the “Design Form” button on the right. InfoPath will then create a new form for you to edit. Make any changes that are necessary, including adding fields that your form needs to collect from the user. Be sure to create fields for any Column that you’ll need to populate in your Content Type.

Once you’ve got your form the way you want, be sure to save it.

Publish the form

The next step is to publish the form so users can access it in SharePoint 2010. To do this, go to the File menu (backstage) and select the “Publish” choice on the left:

clip_image018

Now, click on the “SharePoint Server” option. (If you haven’t saved your form, you will be prompted to save it at this point.)

The Publishing Wizard will open. You’ll need to enter the URL of the SharePoint site:

clip_image020

On the next screen, you need to select “Form Library” from the choices:

clip_image022

On the next screen, you want to select “Update the form template in an existing form library” and then select the library that you created earlier:
clip_image024

On the next screen, you will need to align fields in your InfoPath form to the columns in your Form Library. Click Add and then select the field in the top of window and the matching Form Library column in the lower half:

clip_image026

Repeat this step for each field that you want to map to the Form Library columns.

When you’re done, click Next and then Publish. InfoPath will publish the form and then give a summary of the just published form.

Print | posted @ Tuesday, May 31, 2011 9:40 PM

Comments on this entry:

Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by EnriqueG at 10/18/2011 10:07 PM

Hi Kelly,

I am trying this in SharePoint 2010 (as part of the Office 365 suite), and I have followed your exact steps, but this simply does not work. The data in the InfoPath columns, do not populate to the corresponding columns in the library with the content type I defined.

I have actually done this in Moss 2007 myself and pretty much figured it all out on my own. But I am simply stumped on this one.

I really have no way to explain it, but I pretty much have the exact setup as you do above, but the data doesn't populate. I've been working at it for hours now ... i'm losing my hair over it.
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by EnriqueG at 10/19/2011 2:34 AM

I Submitted a message regarding this earlier. I finally got it to work ... but not using your method above.

When I published my InfoPath form, I had to choose the option under Site Column Group "None: Create new site column)". Also, because of the way i'm doing my form, you have to make sure to set the root of your site here, otherwise, if you need to reference these columns from two different sites within the site collection, they won't be visible.
Gravatar # how can we deploy a new page to sharepoint site at runtime
by radha krishna at 2/13/2012 11:40 PM

1.how can we deploy a new page to sharepoint site at runtime
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Kelly Jones at 2/14/2012 8:22 AM

Radha -- your question has nothing to do with this post. I'm sure if you search the internet for "deploy a page to SharePoint" you'll find something relevant.
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Mohamed at 2/15/2012 1:41 AM

Hi

Im trying to create a minimum of 4 forms with different fields for a single list library(as we have 4 different teams/sections to send information through). I have been told to use Content Types, But i am stumped because im not getting anywhere with it.
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Kelly Jones at 2/15/2012 8:08 AM

Mohamed -- try reading this post.
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Tom at 4/23/2012 9:30 AM

Hi,
it's not specifically the same issue but I've set up a list with 2 content types, the first (incident)opens the infopath form but i then want to be able to select the second content type from an infopath field when i edit the item (I can do this if I don't use the infopath forms).
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Sudip at 7/25/2012 1:35 PM

Hello Kelly,

My question is about the publishing the Infopath form. When I try to publish the form in the Publishing Wizard, the checkbox 'Enable this form to be filled up by a browser' and the last option i.e. Adminstrator approved form template is not there at all. So, when I try to view the form in the browser it gives me an error that the form is not enabled to be viewed by the browser. Any idea why this might be happening? Is this a permission issue?

Thanks a lot,
Sudip
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Craig at 10/26/2012 10:18 AM

I have done all of these steps, as shown above but I need these fields now in a workflow, I am not seeing them in the workflow (with SPD)do you happen to know if this is possible to use these fields in a workflow also and if so then are there any further steps I need to do?
Thanks

Craig
PS: Great post!!
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Rene at 2/14/2013 11:14 AM

Will this form library accept multiple content types, If I want to have different form templates?
Gravatar # re: Using InfoPath 2010 with SharePoint 2010 Content Types
by Marc Miyashiro at 5/9/2013 7:15 PM

The newly created content type does not appear in the list of "Available Site Content Types" when I try to add it to the new Form Library.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 
 
Twitter