$fieldId 			= $v['FieldID'];
$fFieldName = $api -> _getCollectionFieldName($CollectionID , $fieldId);
$string = '<input type="text" class="input" style="width:60px; " name="'.$fFieldName.'" id="'.$fFieldName.'" value="'.$selectedRow[$fFieldName].'"/>';
if ($selectedRow[$fFieldName] != '')
	$color = $selectedRow[$fFieldName];
else
	$color = 'ffffff';	
$string .= '<style type="text/css">#ColorPicker_'.$fFieldName.' { width: 36px;	height: 36px;	 background: url(images/colorpicker/select2.png); cursor:pointer; background-position:-4px -4px;} </style>';
$string .= '<style type="text/css">#ColorPicker_'.$fFieldName.' div { width: 28px;	height: 28px;   background: url(images/colorpicker/select2.png); background-position:-4px -4px; } </style>';

$string .= '<div id="ColorPicker_'.$fFieldName.'"><div style="background-color: #'.$color .'"></div></div>';
$displayfields[$fieldId] = $smarty->fetch('string:'.$string);					