次の方法で共有


Customizing SharePoint List New/Edit/Display Forms individually in InfoPath 2010

Summary:   Customizing list forms is very easy with infopath 2010.  A “Customize Form” option is provided along with the list properties as shown below. Now the problem is the editing performed on the form is reflected same in the entire three list forms (new/edit/display). Sometime the requirement can be to have different kinds of forms for new/edit/display fields. The steps described below provides a solution to this problem.

 

Applies to:   Microsoft InfoPath 2010, Microsoft SharePoint Server 2010, SharePoint Designer 2010
Published:   Jan 2011

Contents

  1. Introduction
  2. Customize list forms
  3. Create views in InfoPath
  4. Associate views with list forms using SP Designer

Introduction

The basic knowledge of following things are required to perform this activity:

  • InfoPath 2010
  • SharePoint Server 2010
  • SharePoint designer 2010

Before you start, set up a list with required number of columns on SharePoint site. The list will be having the OOB new/edit/display pages. These pages are to be individually modified using InfoPath 2010. Open the list as shown below.

 

Customize the list form

  1. On the List tools, click List. You will see a Customize Form option on the right(highlighted in red)
  2. Click on it, the edit form page will be opened in InfoPath
  3. You can modify the form here, but the change will be reflected in all the 3 forms of the list
  4. But here we need to individually modify each form. To achieve this we need to create separate views for each form

Create views in InfoPath

 

  1. On InfoPath, click on Page Design tab on the top ribbon
  2. You would see option to create New View as shown above.
  3. You already will be having an edit view (default). You need to create two more views for new and display options.

 

  1. Click on New View, You will get an option to specify the name as shown below. Specify the name of the view (ex:- New View) and click ok to create the view for new page.
  2. Similarly we need to create one more view for display page. (Name :- Display View)

 

  1.  The three views will be available on the Views drop down list (Highlighted in green)
  2. These three views can be individually modified. You can change page layouts, hide fields or add rules or validations. But still views are not associated with the list views. To do that, we need help of SharePoint designer.
  3. Click on the publish icon to publish the changes made so far.(highlighted below)

 

Associate views with the list forms

Open the list in SharePoint designer. The list forms would be displayed as shown below.(Highlighted in Green)

 

Click and open each list item. Right click as shown below and select Properties.

 

  1. In Properties list, you will see an option “Default View”. Type the View names which you have created in this space. Associate forms with views properly as shown below.
  • NewForm – NewView
  • EditForm – EditView
  • DisplayForm – DisplayView

This way, you can edit the forms independently. On publishing, the changes will be reflected on the SharePoint.