SharePoint: Customizing DispForm.aspx and EditForm.aspx through browser

DispForm.aspx that displays detail view of list item and EditForm.aspx that displays edit view of list item are not customizable by default. You can move to these pages but there is no Edit option in Site Actions menu. But it still possible to customize these pages, add new web parts there and so on. All you need is your web browser.

  1. Go to DispForm.aspx or EditForm.aspx you want to customize.
  2. Change the query string part of URL so that query string is like this:
    DispForm.aspx?ID=???&ToolPaneView=2 &PageView=Shared
    ??? = ID of current list item, you don’t have to change it.
  3. Modify pages as you want and save them.
  4. After first modification the Edit option in Site Actions menu should also be visible now.

I found this information from somewhere but I am not able to find the original blog entry anymore. If somebody knows where it is peale let me know so I can provide link to author here.

Update. Erwin Bastiaensen thought that maybe I found this information from his blog entry Add Web Parts to DispForm, EditForm or NewForm.aspx. I think it is possible, so credits go to Erwin. :)

Liked this post? Empower your friends by sharing it!

Gunnar Peipman

Gunnar Peipman is ASP.NET, Azure and SharePoint fan, Estonian Microsoft user group leader, blogger, conference speaker, teacher, and tech maniac. Since 2008 he is Microsoft MVP specialized on ASP.NET.

    3 thoughts on “SharePoint: Customizing DispForm.aspx and EditForm.aspx through browser

    • February 18, 2011 at 9:55 am
      Permalink

      suppose there are 5 field in Task List. In Edit option I want to show only one field. Lets say only Approve/Reject checkbox.
      How to hide the these fiedls in editform.aspx?

    • May 30, 2011 at 10:11 am
      Permalink

      I am also looking for same kind of information as Rajesh is asking. Please let me know if you find any solution.

      Thanks

    • June 20, 2011 at 6:36 am
      Permalink

      @Ankit,
      To hide or do any kind of further customization you need to add a content editor webpart in the EditForm.aspx page and write javascript or Jquery to hide all the fields. For example to hide a field called Name write below,

      $(“input[title=’Name’]”).parent().parent().parent().hide();

      troubleshoot a bit with the number of parent tag you need if it doesn’t work in forst shot.

      Happy Scripting !

    Leave a Reply

    Your email address will not be published. Required fields are marked *