Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SharePoint Content Type <XmlDocuments> section

  Asked By: Aaditya    Date: Sep 20    Category: Sharepoint    Views: 2226

I have defined the following content type

Code Block


<?xml version="1.0" encoding="utf-8" ?>

<!-- _lcid="1033" _version="12.0.3008" _dal="1" -->

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<Field ID="{1D7FA282-A704-11DC-B9E8-D2A956D89593}" Name="Custom Column1" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Custom Column1" Group="My Custom Columns" Type="Text" DisplayName="Custom Column1" />

<ContentType ID="0x01080100182E0146A7784a19844CBB278643E672"

Name="My Custom Content Type"

Group="Workflow Content Types"

Description="My Custom Content Type"

V2ListTemplateName="doclib"

Version="0">

<FieldRefs>

<FieldRef ID="{1D7FA282-A704-11DC-B9E8-D2A956D89593}" Name="Custom Column1" Required="TRUE" ShowInNewForm="TRUE" ShowInEditForm="TRUE"/>

</FieldRefs>

<XmlDocuments>

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

<FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">

<Display>_layouts/mydisplayform.aspx</Display>

<Edit>_layouts/myeditform.aspx</Edit>

<New>_layouts/myuploadform.aspx</New>

</FormUrls>

</XmlDocument>

</XmlDocuments>

</ContentType>

</Elements>

The "<XmlDocuments>" section defines my custom .aspx forms for Edit, New, and Display. However whenever I go to created an item off this content type I do not get my Form all it get is the "NewForm.aspx" which comes as the default. Does anyone know how to fix this.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Tamika Cummings     Answered On: Sep 20

I think you're real close. Try looking at the NamespaceURI attribute in your XmlDocument element; I think you need a "/url" on the end of that.

Here's a block I've used with success in content  type definitions before.

Code Block


<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<New>_layouts/NewQuote.aspx</New>
<Edit>_layouts/EditQuote.aspx</Edit>
<Display>_layouts/ViewQuote.aspx</Display>
</FormUrls>
</XmlDocument>
</XmlDocuments>

 
Didn't find what you were looking for? Find more on SharePoint Content Type &lt;XmlDocuments&gt; section Or get search suggestion and latest updates.




Tagged: