Other Recent Articles

SharePoint 2010: Customize SharePoint Add/Edit/Display Form

By Eranda Ketawalage on Tuesday, January 10, 2012 0 comments


When you create a SharePoint list the default SharePoint add/edit/display form get its looks by its own. For example the fields appears in the add/edit/display form based on the sequence you added the fields. Also by default all fields of the list are shown in the forms. Sometimes you may need to give a hand to customized that look and feel. I’ll try to give some light on how you can customize the default add/edit/view form of SharePoint list.

Enable Content type Management First

To customize the List forms you need to enable ‘content type management’. You can do so from List settings Page and then click ‘Advance Settings’. Then select yes for “Allow management of content types” as shown below:


image
Figure 1: Enable content type management.

Once you have enabled the content type for a list you will find a available content types associated with the lists under ‘content types’ section of list settings page as shown below:
image
Figure 2: Content type management section in list settings page

Hide fields from add/edit/display form

Sometimes you may want to hide some fields from add/edit/display form. Scenario might be you don’t want users to edit the field directly, rather the hidden field’s data will be populated differently (maybe from event receiver or timer job). To do so click on the Content Type (usually Item) and then you will be landed in a page as shown below:
image
Figure 3: Item Content Type editing page

As you see from figure 3, the content type page is showing all my field but only Product Name (internally the field name is Title) is coming from Item content type. Other fields are added by myself. Now let’s say you want to hide the launchDate field from add/edit/view form. To do so click the field link ‘Launch Date’ and you will be taken to a page as shown below. From that page you can hide a field.
image
Figure 4: Hide fields if needed

For your information, the hidden field will not appear in add/edit/display from but you can still access the field in list views.

Reorder Fields in add/edit/display form

You can reorder how the fields will appear in the list add/edit/display from. To do so take a look a the figure 3. You will find a link “Column Reorder” at the bottom of the item. Click the link and you will be moved to a page as shown below where you can reorder the presence of the fields in add/edit/display form.
image
Figure 5: Reorder fields in add/edit/view forms

Want more customization?

If you are not even happy you can create your own custom add/edit/display from as described my another post. Also you can even edit the add/edit/display from in infopath. To do so open the site in IE browser and the navigate to list settings page. And then click “Form Settings” as shown below:
image
Figure 6: From settings option in list settings page.

Clicking on the form settings page, you will be navigated to a page as shown below:
image
Figure 7: Form settings page.

Clicking ok in the page as shown in figure 7, you will be asked to open the page in InfoPath editor as shown below. However you need to use IE browser to open the InfoPath editor directly from browser:
image
Figure 8: Edit form in InfoPath.

I’m not going to bring InfoPath in today’s discussion as this can be more complex. However If I get chance I’ll come back to you with a post on “how to use InfoPath to edit the form”.


Source : http:// ranaictiu - technicalblog.blogspot.com/

Category: 2010 , SharePoint , UI

0 comments:

Post a Comment

Amazon

Share this