Thursday, July 5, 2012

Customize SharePoint List Form using Infopath

Introduction:
In this article we will discuss how we can customize SharePoint 2010 list form (Add, Edit and View) using infopath 2010. Also you can check my last article on InfoPath 2010 Forms SharePoint 2010.

Description:
By default all these forms are .aspx pages only. But to customize these forms is not an easy job. But by using infopath you can easily customize these forms without knowledge of coding and also without the help of developers.
For this article I have created a custom list using browser in SharePoint 2010. You can follow this article to create a SharePoint list. While adding the item the Add new item screen will be like below:

Now we will see how we can change the scree by using Infopath.
For this for the Ribbon click on Customize form as shown in the figure below and this will open the form in Infopath.

Now in the InfoPath we will not modify anything, Just we will publish the form. To publish click on Quick Publish as shown in the figure below.

This will publish the form to the SharePoint server and will show a confirmation dialog. Click on Ok.

Now go back to the site and click on Add new item. You will show a different UI as shown in the figure below.

Also the edit item screen also got changed according to the infopath design.
Now to revert back to the old style form. Go to the List settings page and from the General Settings click on Form settings as shown in the figure below.
From the Form Settings page from the Form Options select Use the default SharePoint form as shown in the figure below.