Skip to content
Snippets Groups Projects
Commit ca25f50e authored by Apparao G's avatar Apparao G
Browse files

#1783::Layout Editor: Default Value is cleared If fieldProperty is...

#1783::Layout Editor: Default Value is cleared If fieldProperty is enabled/disabled (using a switch UI)
parent 4f821586
No related branches found
No related tags found
No related merge requests found
......@@ -97,9 +97,13 @@ class Settings_LayoutEditor_Field_Action extends Settings_Vtiger_Index_Action {
$fieldInstance->set('masseditable', $massEditable);
}
$defaultValue = decode_html($request->get('fieldDefaultValue'));
$fieldInstance->set('defaultvalue', $defaultValue);
$response = new Vtiger_Response();
$defaultValue = $fieldInstance->get('defaultvalue');
if(!is_null($request->get('fieldDefaultValue', null))) {
$defaultValue = decode_html($request->get('fieldDefaultValue'));
$fieldInstance->set('defaultvalue', $defaultValue);
}
$response = new Vtiger_Response();
try{
$fieldInstance->save();
$fieldInstance = Settings_LayoutEditor_Field_Model::getInstance($fieldId);
......
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