Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have made Custom Content Type, and List Definition from that Content Type. What I'm trying to do now, is create custom display/edit/add forms for List Item, and when user clicks on Add New Item, navigate to add custom form ( AddItem.aspx for instance ). This is the schema definition of my List

<XmlDocuments>
  <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
    <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
      <Display>_layouts/Tests/ViewProject.aspx</Display>
      <Edit>_layouts/Tests/EditProject.aspx</Edit>
      <New >_layouts/Tests/AddProject.aspx</New>
    </FormUrls>
  </XmlDocument>
</XmlDocuments>

But clicking on the Add new Item causes error, and the url of the link is http://myserver/_layouts/listform.aspx

Anybody can help me with this ?

share|improve this question

2 Answers 2

Forms can be easily created with SharePoint Designer. Go to your library, click List ribbon and "Edit list in SharePoint Designer" on the right. If you didn't have it - install it.

In SPD go to desired list and look for "Forms". Then use "New" button and add any type form you need.

Advice - DO NOT modify the defaults. You can set your forms as default ones, but don't edit / remove the existing ones.

share|improve this answer
    
Thanks for advice, I was needed forms that would have custom logic, so SPD wasn't a good fit in this case, however I've overrided XMLDocument node, and set my custom application pages as Edit/View/Add forms for list. –  Michael Dec 24 '12 at 6:58

Try to set Inherit='FALSE' on your content type. XmlDocuments have a tendency to be ignored when they are set to inherit. Also, I'd be sure your content type is the default on the list so when you click 'Add new item', it is the content type selected.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.