How to get the Label for a Value in a Check Box Group

Checkbox Box Groups can be populated by Keywords , XML Applications, Database table, or static lists. To get the label for the selected values in the Check Box Group you can us the $rx.keyword.getChoiceLabel method.

To get the values and labels, selected in a check box group field the following code can be used:

$sys.item.getProperty("rx:checkboxgroupfieldname")
#set($allValues = $sys.item.getProperty("rx:checkboxgroupfieldname").getValues())
	
#foreach($thisValue in $allValues)
   <br/>
   Value: $thisValue.String
   <br/>
   Label: $rx.keyword.getChoiceLabel("contenttypename","checkboxgroupfieldname",$thisValue.String)##
   <br/>
   <hr/>
#end