Showing posts with label Infopath. Show all posts
Showing posts with label Infopath. Show all posts

Tuesday, July 24, 2012

Customize SharePoint List Forms using InfoPath 2010

Introduction

In the previous article, we learnt Create Scopes in SharePoint 2010 using PowerShell.In this article we will be seeing how to customize SharePoint List Forms using InfoPath Forms.

Description:

I have a custom List named Employee Details which contains the following columns.

Here I am going to customize the list forms using InfoPath 2010 and the form looks like the following

Customize SharePoint List Form:

1. Go to Employee Details list.
2. On the ribbon interface, click on List Tools and then click on List tab.
3. Click on Customize Form which is available in Customize List ribbon group.



4. InfoPath form will be opened.
5. Select all content in the form by pressing CTRL+A.
6. Press Delete to delete all the content in the form.

Create Custom Layout:

1. On the Page Design tab, click Page Layout Templates, and then click Color Bar as shown in the following


2. The layout looks like the following


3. Select the layout table, and then click the Center button on the Home tab of the ribbon.
4. Click on Add tables placeholder text.
5. On the Insert tab, click on Two – Column 2 table as shown in the following

6. Add one more Two – Column 2 table.
7. The layout looks like the following


Add a header image to the form:

1. Click on “Click to add title” placeholder text.
2. On the Insert menu, click on Picture.


3. Browse for the picture and then click on Insert.
4. Add the text Employee Details and change the Shading color.
5. Title looks like the following

Insert the fields in the custom layout:

1. From the Fields task pane, Drag and drop the fields to the form. You should highlight both columns when you release the mouse so that the label for the control will appear automatically in the left column.

2. Customized form looks like the following

3. On the Home tab, click on Preview.

4. The form looks like the following


Publish the InfoPath form to SharePoint:

1. Go to File => Info and then click on Quick Publish.

2. Publishing...

3. Form template is successfully published.

InfoPath form in SharePoint Edit or New form:

1. Open the SharePoint Site.
2. Go to Employee Details list and add a new item.
3. New form will be an InfoPath form as shown in the following.

Hope you liked this article, stay tuned for next article in this article series.
Thanks for reading.

InfoPath Web Part in SharePoint 2010

In this article we will be seeing how to create an InfoPath web part in SharePoint 2010.

Introduction

In the previous article, we learnt Customize SharePoint List Forms using InfoPath 2010 In this article we will be seeing how to create an InfoPath web part in SharePoint 2010.
I have a custom List named Employee Details which contains the following columns

I have customized the list forms using InfoPath 2010 and the form looks like the following

And I have modified the view for the Employee Details list as shown in the following

In this article we will be hosting the forms in a Web Part inside any Web Part page and will be creating an list view web part in the same page.  Then we will use the connections between the Web Parts to interact with other components on the page.

Create Web Part Page:

1. Open SharePoint site.
2. Go to Site Actions => More Options...

3. In the left task pane, select Page.
4. Click on Web Part Page and then click on Create.

5. Enter the Name for the page and click on Ok.
6. The page looks like the following

Create List view web part:

1. In the web part page click on Add a Web Part.
2. In the Categories section, click on Lists and Libraries and then click on Employee Details.

3. Click on Add.

Create InfoPath Form web part:

1. In the web part page click on Add a Web Part.
2. In the Categories section, click on Forms and then click on InfoPath Form Web Part.


3. The web part looks like the following

4. Click on Click here to open the tool pane to select the form.
5. In the tool pane, select Employee Details from drop down in List or Library.


6. Select Item from the drop down in Content Type.
7. Click on Ok.

Connecting the web parts:

1. In the InfoPath Form Web Part, click on the down arrow.
2. Click on Connections, then click on Get Form From and click on Employee Details.

3. On the Page tab click on Stop Editing.



4. On the Page tab click on Stop Editing.
5. Click the  icon next to the First name in the Employee Details list, the details for that employee will appear in the InfoPath Form Web Part.


Conclusion:

In this article we have seen how to create an InfoPath form web part.