I haven't been able to find any information regarding this, so I hope you guys can help me out on this.

Since all lists in SharePoint all have an EditForm.aspx and a DispForm.aspx I am wondering if these pages are generated out of a template?

If they are, does anyone know if they are editable so it's possible to customize them so future lists will inherit the changes -- and would you recommend doing it?

2 Answers 2


If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed in DefaultTemplates.ascx file. Additional reading about how to create custom rendering template you can find here and here.

  1. Content Type. If content types enabled for list, when you are createing new item, you can select what content to use and you can override default rendering template for this particular content type.
How to do it:
If you are using custom content type, you can specify rendering template in schema:

      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

If you want to do it programmatically:

var list = web.Lists["MyList"];
var cp = list.ContentTypes["MyCP"];
cp.EditFormTemplateName = "YourCustomTemplateName";

  2. Custom list schema. In list schema there is a section named Forms, for every form you can specify custom rendering template name:

   <Form Type="DisplayForm" Url="DispForm.aspx" Template="CustomSurveyListForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
   <Form Type="EditForm" Url="EditForm.aspx" Template="SurveyForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
   <Form Type="NewForm" Url="NewForm.aspx" Template="MyNewSurveyForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />

  3. Existing (may be out-of-the box) list. I don't know the right way how to do it (except InfoPath of course). Object model for list has property named Forms, and you can get instance of specific form using code list.Forms[PAGETYPE.PAGE_EDITFORM] but SPForm.TemplateName has no setter... The only way that I can suggest - copy definition for oob list, customize forms section and then create list using xml ListInstance element and CustomSchema attribute.
Hope this helps.


The EditForm.aspx and DispForm.aspx are the form pages available in all lists. These pages contains the ListForm webpart, that will render the webpart to newform or editform based on parameters we have provided in the webpart. (The controls are available in ControlTemplates folder under 14 hive folder)

Or we can modify the webpart using Infopath form or SharePoint Designer. After that we can save the list as a template and create a list using the template will provide you the modify the forms.

Or we have to create a List Template using List Definition file with the Forms information, will have a list with your user - defined forms.

  • But what if I want to modify the SharePoint standard lists' forms -- like Announcement list, Custom list, Calendar, without making new List Templates or List Definitions?
    – user2536
    Commented Dec 29, 2011 at 9:47
  • Can we change which editform a list or library uses by default? i.e. can we change the defaulteditformurl through SharePoint designer?
    – David
    Commented Dec 11, 2012 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.