0

I have created a field to add it in the content type and that content type is used in the list.

My field's declarative part is:

<!--Field Type of project-->
  <Field ID="{0D3060A0-D1A4-4468-B6D3-411839955928}"
           Name="oiplbProjectType"
           StaticName="oiplbProjectType"
           DisplayName="$Resources:OIPLBIntranet,fldoiplbProjectTypeDisplayName;"
           Description="$Resources:OIPLBIntranet,fldoiplbProjectTypeDescription;"
           Type="Choice"
           Required="TRUE"
           Format="Dropdown"
           ShowInEditForm="FALSE"
           ShowInNewForm="FALSE"
           ShowInFileDlg="FALSE"
           Group="$Resources:OIPLBIntranet,grpFields;">
    <CHOICES>
      <CHOICE>$Resources:OIPLBIntranet,fldoiplbProjectTypeChoice1;</CHOICE>
      <CHOICE>$Resources:OIPLBIntranet,fldoiplbProjectTypeChoice2;</CHOICE>
      <CHOICE>$Resources:OIPLBIntranet,fldoiplbProjectTypeChoice3;</CHOICE>
      <CHOICE>$Resources:OIPLBIntranet,fldoiplbProjectTypeChoice4;</CHOICE>
    </CHOICES>
  </Field>

This field is referenced in the content type like:

<FieldRefs>
  <FieldRef ID="{E94ED779-2B91-4C68-8B61-6F960FE0018E}" Name="oiplbProjectName"/>
  <FieldRef ID="{70A85923-2950-4469-8AAF-1E90D8DDE7E6}" Name="oiplbAboutProject"/>
  <FieldRef ID="{8326164A-73A9-4DCB-BC72-AF189328FB51}" Name="oiplbOwner" DisplayName="$Resources:OIPLBIntranet,fldoiplbProjectOwnerDisplayName;"/>
  <FieldRef ID="{2F30125C-D2C9-459F-9AC5-1796F52C0C4B}" Name="oiplbDepartment" DisplayName="$Resources:OIPLBIntranet,fldoiplbProjectOwnerDepartmentDisplayName;" Required="TRUE"/>
  <FieldRef ID="{4E68D20F-C118-421C-8336-A0B1E4BA1706}" Name="oiplbManager" DisplayName="$Resources:OIPLBIntranet,fldoiplbProjectManagerDisplayName;"/>
  <FieldRef ID="{F379EB98-E312-44AE-800F-6AAFB781AF55}" Name="oiplbMembers" DisplayName="$Resources:OIPLBIntranet,fldoiplbProjectMembersDisplayName;"/>
  <FieldRef ID="{CA82130E-0051-474E-89CC-35CA51AE0FE4}" Name="oiplbStreeringGroup"/>
  <FieldRef ID="{E72347A3-6CCE-4FFB-8BD5-BD2B7DDBF855}" Name="oiplbReferenceGroup"/>
  <FieldRef ID="{0D3060A0-D1A4-4468-B6D3-411839955928}" Name="oiplbProjectType"/>  // Here field is referred.
  <FieldRef ID="{2649184E-DDF5-47FD-8C83-899A8C880BCE}" Name="oiplbProjectStartDate"/>
  <FieldRef ID="{F322DB58-F2A2-4DF8-9AA3-2D6EBE2D94CE}" Name="oiplbProjectEndDate"/>
  <FieldRef ID="{7E146073-5157-48A0-A17C-06E87162573F}" Name="oiplbEstimatedBudgetMoney"/>
  <FieldRef ID="{44AC48F1-4AC1-4C65-ADA8-0074D55C54B6}" Name="oiplbEstimatedBudgetTime"/>
  <FieldRef ID="{0DBB1172-CD48-40BC-96CF-9E8F388EB013}" Name="oiplbProjectStatus"/>
  <FieldRef ID="{DFA037B2-8CCC-4AB9-AF1B-4CC4F6B66B42}" Name="oiplbProjectNumber"/>
  <FieldRef ID="{BDA547BE-D3CB-433D-A372-664158729790}" Name="oiplbSiteUrl" />
  <FieldRef ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" Name="TaxCatchAll"/>
  <FieldRef ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" Name="TaxCatchAllLabel"/>
</FieldRefs>

After creating a site the list is created successfully and the field oiplbProjectType is displayed to the view only, but while creating new entry to the form it is not displayed in the form.

I also checked the columns from the list settings and that field is also available there. What should I do?

  • have you tried setting ShowInNewForm="TRUE" in the above code sample? – Jinxed Jan 6 '14 at 7:00
1

It's not displayed because in the field definition you have set ShowInNewForm = "FALSE". Change it to TRUE or remove that atribute and it will show when creating new item.

You may also want to change ShowInEditForm and ShowInFileDlg.

| improve this answer | |
3

Change this in the above code:

      ShowInEditForm="TRUE"
       ShowInNewForm="TRUE"
| improve this answer | |

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.