In this post we will discuss how we can publish an InfoPath form as a content type in SharePoint 2013 site. Once we publish an infopath form as a content type, then we can reuse the template in multiple sharepoint list or libraries in the site as well as in the child site of that sharepoint site.
Also you can read:
– Deploy Administation approved InfoPath forms in SharePoint 2013
– SharePoint 2013 Online Content Search WebPart with Query String
– Generate URL using Calculated column in SharePoint 2013 List
Follow below steps:
First we will design a InfoPath form template. Open InfoPath Designer 2013. Before this make sure “SharePoint Server Enterprise Site Collection features” is already activated. You can go to Site Settings and in the Site collection feature under Site Collection Administration section, you can verify whether the feature is activated or not. If now activate the feature.
The other thing you need to verify is whether State Service is already started or not. We can verify this from Central Administration. Go to Central Administration -> Application Management Then click on Manage Service Application which is under Service Application section.
Now we can design our InfoPath form.
Once you open Infopath designer 2013, it will display lots of form templates which we can use to design InfoPath form. Apart from 2013, it will also show InfoPath 2010 templates.
Here choose a blank form template and then click on Design Form as shown in the fig below:
Now we can add our controls to the form. From the Insert tab we can choose to insert a table layout to the form. Here I have added a two-column layout. Once we will add this, we can see the layout in the form will appear like below:
We will design a simple Employee details form which has 3 text boxes and one option button with two options. The form will look like below:
By default if you will see the Fields section in the right site you will able to see by default InfoPath gave the name as field1, field2, field3 etc.
To give a valid name right click on the Control in the form and then click on Textbox properties. Then give a good name in the Field name box like below:
Now our form is ready, we can publish it now.
Click on File -> Publish and then click on SharePoint Server as shown in the fig below:
Then it will ask the form to Save before publish the form to SharePoint server. Click on OK and Save the form.
I have saved the form in my local desktop with the name as “MyEmployeeDetails”.
Then it will ask for the local SharePoint site like below:
Then in the next screen, choose the check box, Enable this form to be filled out by using a browser. So that people can open the form in the browser and submit the form. And then choose “Site Content Type (advanced)” option as shown in the fig below:
Then in choose Create a new content type and choose base content type as Form as shown in the fig below:
Then it will ask to give a name for the content type and a description for the content type as shown in the fig below:
Then we need to give a library and a file name where the form will be published.
Then we we can add the columns which will be available as columns in sharepoint site. Click on Add button and then choose the column and click on OK.
Here we can add all the columns and it will appear like below:
Then it will ask to verify the details and click on Publish button to publish the form.
Once the form successfully published it will display a successful message like below:
To validate this you can navigate to the form library and you can see the form there.
We can also go to the site settings and then click on Site content types which is under Web Designer Falleries. In the Site Content Types page, You can filter based on Microsoft InfoPath form and you can see our form is published as a content type as shown in the fig below:
Add InfoPath Content Type to a SharePoint library:
In the next step we will see how we can add the published infopath content type to a document library. Open your SharePoint site and then create a document library. Then open the document library and then from the ribbon click on library settings to go to document library settings page.
Then in the Library settings page, click on “Advanced settings” which is under General Settings section.
Then in the Content Types section choose, Allow management of content types? to Yes as shown in the fig below:
Then in the document library settings page, go to the Content Types section and click on Add from existing site content types as shown in the fig below:
Then in the Add Content Types page, choose Microsoft InfoPath group and then from the type select the content type and click on Add. Then click on OK.
Then go to the document library, From ribbon click on Files -> New Document and then you will see our content type which we have deployed like below:
Once you will click on the option the InfoPath form will open like below:
Hope this post will be helpful.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.