Create Custom List form

if you have a specific processing in form list (display, edit, new), and you want to create your custom form programmatically. you can follow these steps:

  1. Create application page
    -add application page (customform.aspx) in layouts/Project/
    -if you are in the edit mode or display mode, to get the litsItem :

    SPContext.Current.ListItem
  2. Add this code in the default content type of the list
    <ContentType .....>
     <XmlDocuments>
     <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
     <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
     <Edit>_layouts/Project/customform.aspx</Edit>
     <Display>_layouts/Project/customform.aspx</Display>
     </FormUrls>
     </XmlDocument>
     </XmlDocuments>
    </ContentType>
Advertisements
This entry was posted in SharePoint 2010, SharePoint 2013. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s