$imProviders = CRM_Core_PseudoConstant::IMProvider();
//start of code to set the default values
foreach ($fields as $name => $field) {
+ $skip = FALSE;
// skip fields that should not be displayed separately
if ($field['skipDisplay']) {
continue;
$customVal = (float )($params[$name]);
}
elseif ($dao->data_type == 'Date') {
- $date = CRM_Utils_Date::format($params[$name], NULL, 'invalidDate');
- if ($date != 'invalidDate') {
- $customVal = $date;
+ $customVal = $displayValue = $params[$name];
+ if (!empty($params[$name . '_time'])) {
+ $customVal = $displayValue = $params[$name] . ' ' . $params[$name . '_time'];
}
+ $skip = TRUE;
}
else {
$customVal = $params[$name];
$returnProperties = array($name => 1);
$query = new CRM_Contact_BAO_Query($params, $returnProperties, $fields);
$options = &$query->_options;
- $displayValue = CRM_Core_BAO_CustomField::getDisplayValue($customVal, $cfID, $options);
-
+ if (!$skip) {
+ $displayValue = CRM_Core_BAO_CustomField::getDisplayValue($customVal, $cfID, $options);
+ }
//Hack since we dont have function to check empty.
//FIXME in 2.3 using crmIsEmptyArray()
$customValue = TRUE;