适用于: SharePoint 2016 |SharePoint Foundation 2013 |SharePoint Online |SharePoint Server 2013
包含 Schema.xml 文件中的列表定义或全局 Onet.xml 文件中的基本列表类型的字段定义,以指定在列表中实现的字段。
<Fields  Revision = "Integer">  ...
</Fields>
元素和属性
下面各部分介绍了属性、子元素和父元素。
Attributes
| 属性 | 说明 | 
|---|---|
| Revision | 可选属性,类型为 Integer。 | 
子元素
父元素
出现次数
- 最小值:0
- 最大值:1
示例
以下示例来自 任务Schema.xml 文件,其中列出了任务列表中唯一使用的字段。
<Fields>
   <Field Type="Choice" Name="Priority" DisplayName="Priority" >
      <CHOICES>
         <CHOICE>(1) High</CHOICE>
         <CHOICE>(2) Normal</CHOICE>
         <CHOICE>(3) Low</CHOICE>
      </CHOICES>
      <Default>(2) Normal</Default>
   </Field>
   <Field Type="Choice" Name="Status" DisplayName="Status">
      <CHOICES>
         <CHOICE>Not Started</CHOICE>
         <CHOICE>In Progress</CHOICE>
         <CHOICE>Completed</CHOICE>
         <CHOICE>Deferred</CHOICE>
         <CHOICE>Waiting on someone else</CHOICE>
      </CHOICES>
      <Default>Not Started</Default>
   </Field>
   <Field Type="Number" Name="PercentComplete" Percentage="TRUE"
         Min="0" Max="1" DisplayName="% Complete"></Field>
   <Field Type="User" List="UserInfo" Name="AssignedTo"
         DisplayName="Assigned To"></Field>
   <Field Type="Note" RichText="TRUE" Name="Body"
         DisplayName="Description" Sortable="FALSE"></Field>
   <Field Type="DateTime" Name="StartDate" DisplayName="Start Date">
      <Default>[today]</Default>
   </Field>
   <Field Type="DateTime" Name="DueDate"
         DisplayName="Due Date"></Field>
</Fields>