<?php
$val .= '<ul class="list-unstyled selection-group">
	';

if ($scope->locally()->hasValue('IsReadonly', null, true)) { 
$val .= '
		';

$scope->locally()->obj('FieldSet', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
			';

if ($scope->locally()->hasValue('Selected', null, true)) { 
$val .= '
				<li class="selected selection-group__item" id="';

$val .= $scope->locally()->XML_val('HolderID', null, true);
$val .= '">
					';

$val .= $scope->locally()->XML_val('RadioLabel', null, true);
$val .= '
					';


$val .= '
					';

if ($scope->locally()->hasValue('FieldList', null, true)) { 
$val .= '
						<div class="selection-group selection-group__item__fieldlist" id="';

$val .= $scope->locally()->XML_val('ID', null, true);
$val .= '">
							';

$scope->locally()->obj('FieldList', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
								';

$val .= $scope->locally()->XML_val('Fieldholder', null, true);
$val .= '
							';


}; $scope->popScope(); 
$val .= '
						</div>
					';


}
$val .= '
				</li>
			';


}
$val .= '
		';


}; $scope->popScope(); 
$val .= '
	';


}else { 
$val .= '
		';

$scope->locally()->obj('FieldSet', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
			<li class="selection-group__item';

if ($scope->locally()->hasValue('Selected', null, true)) { 
$val .= ' selected';


}
$val .= '" id="';

$val .= $scope->locally()->XML_val('HolderID', null, true);
$val .= '">
				<label>';

$val .= $scope->locally()->XML_val('RadioButton', null, true);
$val .= ' ';

$val .= $scope->locally()->XML_val('RadioLabel', null, true);
$val .= '</label>
				';


$val .= '
				';

if ($scope->locally()->hasValue('FieldList', null, true)) { 
$val .= '
					<div class="selection-group selection-group__item__fieldlist" id="';

$val .= $scope->locally()->XML_val('ID', null, true);
$val .= '">
						';

$scope->locally()->obj('FieldList', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
							';

$val .= $scope->locally()->XML_val('Fieldholder', null, true);
$val .= '
						';


}; $scope->popScope(); 
$val .= '
					</div>
				';


}
$val .= '
			</li>
		';


}; $scope->popScope(); 
$val .= '
	';


}
$val .= '
</ul>
';

