Default Element
The Default element contains the default value of a field to which new item forms are initialized. This element has two uses:
- In a Switch statement, it is run if none of the Case elements returns TRUE.
- Within the Field element, it sets the default value for a field.
Syntax
<Default
ExpandXML = "TRUE" | "FALSE">
</Default>
Attributes
Name | Description |
---|---|
ExpandXML | TRUE to pass the rendered content again through the CAML interpreter, which allows CAML to render CAML. |
Example
The following example provides descriptive text and sets the default value of the FavColor field to black.
<Field Type="Text" Name="FavColor">
<Description>Enter your favorite color here. If you don't have a favorite color, enter "Black".
</Description>
<Default>Black</Default>
</Field>