I have tried to create a custom form template but without success. I have followed several tutorials but it still does not use the custom template. If I change the template id to override the 'ListForm' it works. So I'm thinking that I've done something wrong in the content type definition. Here is the code:

   <?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Field ID="{9381E2BE-CE62-4673-9C0D-8A7E4B087B55}" Name="MyPal" DisplayName="My Pal" Type="Text" />
  <!-- Parent ContentType: Item (0x01) -->
  <ContentType ID="0x01009dea68f3be5946789ab1a8ac699fcb8f"
               Name="UnderstadingContentTypes - MyContentType"
               Group="Custom Content Types"
               Description="My Content Type"
      <FieldRef ID="{9381E2BE-CE62-4673-9C0D-8A7E4B087B55}" Name="MyPal" DisplayName="My Pal" />
      <FieldRef ID="{77EEC76F-561A-422B-8975-21DCB2EC6C7B}" Name="External" DisplayName="external"/>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <FormTemplates  xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

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

And here is the template code. It is just made to show that it works:

<%@ Control Language="C#"   %>
<%@Assembly Name="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@Register TagPrefix="SharePoint" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.WebControls"%>
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="/_controltemplates/ToolBar.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBarButton" src="/_controltemplates/ToolBarButton.ascx" %>

<SharePoint:RenderingTemplate id="MyCustomForm" runat="server">
Hello My Template
  • 1
    Can I just point out that the title of this question mentions SP2010 yet the code in the template sample uses version 12 of all the assemblies... – James Love Jun 11 '10 at 10:39
  • @James: That's true although the binding redirects should sort that out. Still, not recommended! – Alex Angas Jul 1 '10 at 4:43
  • Inherits="TRUE" is the culprit summit7systems.com/blogs/jamescurry/?p=10 – Dennis G Jan 20 '11 at 11:29
  • how did you deploy this form ?am also looking for this kind of implementation – userAZLogicApps Jan 4 '17 at 2:13

if u remove Inherits="True" from ur content type definition then it should work. i am not sure why, but the template settings get lost if inherit is set to true.

Hope this works.



I had a problem getting my workflow to use a custom task form template that I deployed. The problem was that I was not inheriting from the Workflow Task ContentType properly. I had to prepend the content type id with the task id (0x010801), but I also had to append that ID with two zeros. (I could not find the rational for that, but it was neccessary.) Using that same rational, what happens if you pad your ContentType ID?

Also, are you also deploying your template form? (e.g. MyCustomForm)?

Here is the code snippet for my Task Form that I was able to use in replace of a workflow task form:

  <!-- Field Elements -->
  <Field ID="{9781B75F-FDB2-4523-9516-9B6FF1DC5930}"
    Group="My Task Content Type Columns"
<!-- Parent ContentType: Task + 00 (0x01080100) -->
  <ContentType ID="0x01080100283F3E837128472399895F22E79FC50C"
             Name="My Task ContentType"
             Group="My Content Types"
             Description="My Task Content Types"
      <!-- Fields (match GUID with FieldID)-->
      <FieldRef ID="{9781B75F-FDB2-4523-9516-9B6FF1DC5930}"></FieldRef>
    <!-- Custom Task Form definition-->
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">

Hi Yes setting the Inherits="True" does work, but then you loose the advantage of inheritance. In my case this whas not acceptable.

What worked for me whas to deploy my Contenttype with Inherits = True And then a second depoyment where Inherits= False.

Then I whas able to keep the advantage of inheritance, and get my custom Task edit form working.

Think this must be a bug in SharePoint 2010.

  • What do you mean that you first deploy with inherits=true and afterwards inherits=false? – Dennis G Jan 20 '11 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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