How to Manage Default Field Values in Sitecore CMS
January 13, 2015
This is the sixteenth in a series of posts about learning how to use and develop for Sitecore CMS; it is the follow-up post to “How to Change an Item’s Template in Sitecore CMS”. In this “How to” post I will be covering how to manage default field values in Sitecore CMS.
Customizing default values can be especially helpful to content editors when creating content. By specifying good defaults, newly created items can have data pre-populated so that content editors don’t have to waste time with filling in the same fields over and over.
Setting Up Standard Values
To set default field values for a specific template, first you need to create a “Standard Values” item. The standard values item is an item of the given template type which will be used to hold the default field values.
To create the standard values item for a given template, select the template in the content editor.
Template items have a custom “Builder” tab in the content editor. Selecting the “Builder” tab will show a “Builder” tabgroup in the ribbon as well. Select the “Options” tab in the builder section of the ribbon.
Click on the “Standard Values” button in the “Template” section of the “Options” tab in the ribbon. This button will automatically create a new Standard Values item.
The item will be named
__Standard Values so that it doesn’t conflict with any reasonable section names.
The standard values item will be of the selected template’s type. Any modifications to the template will be seen immediately on the standard values item, just like they would on any other item created from the template.
Assigning Default Values
To assign a default value, set the relevant field and save the changes.
Any items created from the template will have field values that match the standard values.
Fields that have a default value will show “[standard value]” after their field name.
Modifying the field value will remove the “[standard value]” notice:
Stay up to date with our email updates!
If you found this post helpful, there are plenty more where it came from! You'll find the first 10 here.
Download the first 10 posts in our Sitecore how-to series by Developer Tim Leverett!