SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've encountered the strangest problem. I've got two features:

  • ContentTypes: contains a couple of custom fields and a content type (based on plain ol' 0x01) called Withdrawals that uses them. Scoped to Site.
  • Registration: contains a ListTemplate and a ListInstance that just modifies a basic Custom List to enable content types and add my custom content type. Scoped to Web.

Here's what's happening. When I activate ContentTypes, the content type and field are deployed as expected into my site collection. When I activate Registration, the list is provisioned and the content type is added as expected.

When I try to add a new item to the list, the list form only shows the Title field from Item. Now, here's the weird part. If I add a second content type to the list (through the UI), the list form suddenly works correctly. This makes me think there's something wrong with my content type. Here's what I'm working with. Some names have been changed to protect the innocent.

<ContentType ID="0x0100B4366B5F6383463b8464DBD2EDD5E097"
           Description="Record of a team withdrawal"
   <FieldRef ID="{CE8F7528-E643-4473-94E0-BAA57BD2F6E6}"/>
   <FieldRef ID="{E508D1FA-D3A5-4e91-828B-3BFB43D4F7C5}"/>
  <XmlDocument NamespaceURI="">
    <FormTemplates xmlns="">

And here are the relevant bits of SCHEMA.XML:

<List xmlns:ows="Microsoft SharePoint" Title="Withdrawals" FolderCreation="FALSE" Direction="LTR" Url="Lists/Withdrawals" EnableContentTypes="TRUE" BaseType="0">
      <ContentTypeRef ID="0x0100B4366B5F6383463b8464DBD2EDD5E097" />
      <ContentTypeRef ID="0x0120" />
      <Field ID="{CE8F7528-E643-4473-94E0-BAA57BD2F6E6}" Name="TeamName" StaticName="TeamName" DisplayName="Team Name" Type="Text">
      <Field ID="{E508D1FA-D3A5-4e91-828B-3BFB43D4F7C5}" Name="WithdrawalComments" StaticName="WithdrawalComments" DisplayName="Withdrawal Comments" Type="Note">

It's also been added to the ViewFields in the two default views. What the heck am I doing wrong here?

share|improve this question
This is the kind of detail I like to see on questions. Great work +1 – Charles Lee Apr 14 '10 at 14:28

After hours of frustration, I finally figured out the problem. In the <ContentType> element, you need to specify both the ID and Name in each FieldRef. When I added the Name attribute to each FieldRef, those fields began to appear as expected on the item forms.

share|improve this answer
Cool thanks for letting us know. Another thing that drove me crazy and took me hours to figure out was if you don't include the parenthesis in the field ID then nothing works either... – MichalPisarek Apr 14 '10 at 16:12

Your Answer


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.