switch ($html_type) {
case 'Radio':
if ($data_type == 'Boolean') {
- $option = array('No', 'Yes');
+ $options = array('No', 'Yes');
+ }
+ else {
+ $options = $option;
}
if (is_array($value)) {
$display = NULL;
foreach ($value as $data) {
- $display .= $display ? ', ' . $option[$data] : $option[$data];
+ $display .= $display ? ', ' . $options[$data] : $options[$data];
}
}
else {
- $display = CRM_Utils_Array::value($value, $option);
+ $display = CRM_Utils_Array::value($value, $options);
}
break;
case 'AdvMulti-Select':
case 'Multi-Select':
if (is_array($value)) {
+ if ($html_type == 'CheckBox') {
+ // CRM-12989 fix
+ CRM_Utils_Array::formatArrayKeys($value);
+ }
+
$checkedData = $value;
}
else {
* @param int $fileID
* @param bool $absolute
*
+ * @param string $multiRecordWhereClause
+ *
* @return array
*/
public static function getFileURL($contactID, $cfID, $fileID = NULL, $absolute = FALSE, $multiRecordWhereClause = NULL) {