Skip to content
Snippets Groups Projects
Commit 8c8a865d authored by Prasad's avatar Prasad
Browse files

Fixed order of value check and processing

parent 1cd10843
No related branches found
No related tags found
No related merge requests found
......@@ -129,13 +129,13 @@ class Settings_LayoutEditor_Field_Action extends Settings_Vtiger_Index_Action {
if (isset($defaultValue)) {
if ($defaultValue && $fieldInfo['type'] == 'date') {
$defaultValue = DateTimeField::convertToUserFormat($defaultValue);
} else if ($defaultValue) {
$defaultValue = $fieldInstance->getDisplayValue($defaultValue);
} else if (is_array($defaultValue)) {
foreach ($defaultValue as $key => $value) {
$defaultValue[$key] = $fieldInstance->getDisplayValue($value);
}
$defaultValue = Zend_Json::encode($defaultValue);
} else if ($defaultValue) {
$defaultValue = $fieldInstance->getDisplayValue($defaultValue);
}
}
$fieldInfo['fieldDefaultValue'] = $defaultValue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment