Type (as shown on the Create Column page)Field TypeNotesMSDN LinksSingle line of textType=”Text” Microsoft.Sharepoint.SPFieldTextMultiple lines of textType=”Note”In the Create Column page, can pick the type of text to allow. To enable the different sub-types, you need to set a couple of other attributes on the field element.Plain TextRichText=”FALSE” (default value)Rich TextRichText=”TRUE”RichTextMode=”Compatible” (default value)Enhanced TextRichText=”TRUE”RichTextMode=”FullHtml”In addition, you can also set the number of lines to display using the NumLine attribute.Further Information on MSDN:Microsoft.Sharepoint.SPFieldMultiLineTextChoice (menu to choose from)Single ChoiceType=”Choice”Multi-ChoiceType=”MultiChoice"Pick the display format for the Choice and Multi-Choice types, respectively:Drop-Down Menu or Combo BoxFormat=”Dropdowns”Radio Buttons or Check BoxesFormat=”RadioButtons”Define the options a user can pick from using the Choices element. Below is a skeleton to explain this.<Field Name=”MyOptions” Type=……> <CHOICES> <CHOICE>Option 1</CHOICE> <CHOICE>Option 2</CHOICE> </CHOICES></Field>If you would like to give the user an option to add their own value, set the attribute FillInChoice=”TRUE”.Microsoft.Sharepoint.SPFieldChoiceMicrosoft.Sharepoint.SPFieldMultiChoiceNumberType=”Integer”This field type also lets you define:Minimum Value (0 for example)Min=”0”Maximum Value (100 for example)Max=”100”Decimal Places (Default is Automatic, example 2 decimal places)Decimals=”2”Show as Percentage (Default is False)Percentage=”FALSE”Microsoft.SharePoint.SPFieldNumberCurrencyType=”Currency”This field type also lets you define:Minimum Value (0 for example)Min=”0”Maximum Value (100 for example)Max=”100”Decimal Places (Default is Automatic, example 2 decimal places)Decimals=”2”Currency FormatThis sets the display format of the currency.LCID=”3081” 3081 sets the format English – Australian. For a complete list of Locales, see the MSDN link in the next column.Microsoft.Sharepoint.SPFieldCurrencyLocale IDsDate and TimeType=”DateTime”This field also lets you define:Date and Time FormatShow the date only:Format=”DateOnly”Show the date and time:Format=”DateTime”Microsoft.Sharepoint.SPFieldDateTimeYes/NoType=”Boolean”When setting the default value, you need to use the binary values:No/False = 0Yes/True = 1Microsoft.Sharepoint.SPFieldBooleanPerson or GroupSingle User or GroupType=”User”Multiple Users or GroupsType=”MultiUser”This field also lets you define:Allow multiple selections Set the Type to MultUser and the attribute Mult=”TRUE”Allow selection ofPeople OnlyUserSelectionMode=”PeopleOnly”People and GroupsUserSelectionMode=”PeopleAndGroups”Choose fromIf you want to limit the option list to a SharePoint Group, use the UserSelectionScope attribute. Set it to the ID of the SharePoint group (Integer value). For example, UserSelectionScope=”3”.Show fieldSet the name of the field from the User’s profile properties that you want to display. For example, show the user’s name property:ShowField=”Name”If you would also like to show presence (Office Communicator integration required):Presence=”TRUE”Microsoft.Sharepoint.SPFieldUserHyperlink or PictureType=”URL”You can display the URL as a Hyperlink or Picture. Use the Format attribute to pick which one:HyperlinkFormat=”Hyperlink”PictureFormat=”Image”
转载于:https://www.cnblogs.com/foreverfendou/p/10838709.html
转载请注明原文地址: https://mac.8miu.com/read-14106.html