Prev Next |
Use for data that can be only one of two possible values, such as Yes/No, True/False, On/Off. Null values are not allowed.
Client view:
When testing the value of a checkbox, you should always use the construct similar to this:
<xsl:if test="sc:fld('my checkbox field', .) ='1'">
<xsl:text>The box is checked</xsl:text>
</xsl:if>
as the value of a field may be blank (in which case the checkbox is unchecked).
Valid default values:
- 1 stands for ‘checked’;
- 0 stands for ‘unchecked’.
Source:
Ignored.
For information about accessing the field values programmatically, please follow the links below:
Accessing Checkbox field value in C#
Accessing Checkbox field value in XSLT
2.2. Checklist
Use to create a field that allows you to select a set of items from a list of values using checkboxes. The checklist will fetch its values from the item in the tree as specified by the source field property.
Client view:
Valid default value:
A set of GUIDs separated by pipes (‘|’):
{DDF10A96-C7ED-46CA-836B-41DE58A17F5D}|{F0144930-508C-421C-99F8-77B7D50538C4}
If the default value is set, the items which correspond to the specified GUIDs will appear as checked in the list.
Source:
Children of the Item specified here will appear in the checklist.
Sample source value: /sitecore/content/Home/Countries
For information about accessing the field values programmatically, please follow the links below:
Accessing Checklist field value in C#
Accessing Checklist field value in XSLT
Prev Next