SharePoint field not displaying in Display / Edit / New pages

I wrote a diagram for a list that needs to add only one column to the default default list, which is a numeric field called months. The field is displayed in the default view and is actually created in the list. Auto-list with values ​​that are set correctly. The problem is that the field does not appear on the display / editing / new pages. It can be set via a data table view. I do not understand why it does not appear when I specifically installed it in the circuit.

It would be very helpful to suggest any suggestions.

<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" 
      Title="ReviewPeriods" 
      FolderCreation="FALSE" 
      Direction="$Resources:Direction;" 
      Url="Lists/ReviewPeriods" 
      EnableContentTypes="TRUE" 
      BaseType="0">
 <MetaData>
  <ContentTypes>
   <ContentTypeRef ID="0x01">
        <Folder TargetName="Item" />
      </ContentTypeRef>
  </ContentTypes>
  <Fields>
   <Field ID="{B99EB797-4057-4a75-90BF-B40D0F89A9D9}"
             Type="Number"
             Decimals="0"
             Min="0"
             Max="100"
             Percentage="FALSE"
             Name="Months" 
             Required="TRUE"
             Group="SEED"
             DisplayName="Months"
             StaticName="Months"
             ShowInDisplayForm="TRUE"
             ShowInEditForm="TRUE"
             ShowInNewForm="TRUE">
   </Field>
  </Fields>
  <Views>   
   <View BaseViewID="0" 
            Type="HTML"
            WebPartZoneID="Main" 
            DisplayName="Default View" 
            DefaultView="TRUE" 
            SetupPath="pages\viewpage.aspx" 
            ImageUrl="/_layouts/images/generic.png" 
            Url="AllItems.aspx">

... Hidden stuff ...

<ViewFields>
          <FieldRef Name="LinkTitle"></FieldRef>
          <FieldRef Name="Months"></FieldRef>
    </ViewFields>
    <Query>
     <OrderBy>
      <FieldRef Name="Title">
      </FieldRef>
     </OrderBy>
    </Query>
   </View>
  </Views>
  <Forms>
   <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
   <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
   <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
  </Forms>
 </MetaData>
</List>
+3
source share
3 answers

, , , , , Item (0x01), . , / , .

:

  • ( <ContentTypes> )
  • ,
+4

- . New/Display/Edit, . , .

, . , , . .

- , New/Display/Edit , .

+1

Like you, I did the same thing (creating a content type for each of the list that I wanted to create) Until I got into the code below. If you look at the code below, I removed the tag <ContentTypes>and forcibly added a header field and an additional Description field.   

<Fields>
  <Field ID="{9830F5FC-99E0-4052-9CC0-50CBEDE80002}" Type="Text" Name="Title" DisplayName="Type Name" Required="TRUE" MaxLength="255" Version="1" RowOrdinal="0">
    <Default/>
  </Field>      
  <Field Type="Note" DisplayName="Description" Required="FALSE" NumLines="6" RichText="TRUE" RichTextMode="Compatible" Sortable="FALSE" 
         ID="{63C25492-BA98-4096-A6D7-F85885E0A425}" Name="Description"
          RowOrdinal="0"/>
</Fields>

...... Hidden

<MetaData>

The answer was correct +1

+1
source

Source: https://habr.com/ru/post/1724416/


All Articles