Skip to content
Snippets Groups Projects
Commit 0314c3b0 authored by madhurajshanbhogh's avatar madhurajshanbhogh
Browse files

#Fixes::158512091::madhusr::Default check box field is updating as 'on' and displaying 0 on uncheck

parent 0c4c8699
No related branches found
No related tags found
1 merge request!1082#Fixes::158512091::madhusr::Default check box field is updating as 'on' and displaying 0 on uncheck
......@@ -450,7 +450,7 @@ Vtiger_Field_Js('Vtiger_Boolean_Field_Js',{},{
* @return - checkbox element
*/
getUi : function() {
var html = '<input type="hidden" name="'+this.getName() +'" value="0"/><input class="inputElement" type="checkbox" name="'+ this.getName() +'" ';
var html = '<input type="hidden" name="'+this.getName() +'"/><input class="inputElement" type="checkbox" name="'+ this.getName() +'" ';
if(this.isChecked()) {
html += 'checked';
}
......
......@@ -125,7 +125,7 @@ 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) {
} else if ($defaultValue) {
$defaultValue = $fieldInstance->getDisplayValue($defaultValue);
} else if (is_array($defaultValue)) {
foreach ($defaultValue as $key => $value) {
......
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