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

Added fix to handle empty check on webform values

parent 874f2686
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,8 @@ class Settings_Webforms_Save_Action extends Settings_Vtiger_Index_Action {
if (!$fieldValue) {
$fieldValue = $fieldModel->get('defaultvalue');
}
if($fieldModel->isMandatory() && empty(trim($fieldValue))){
$isValueEmpty = is_array($fieldValue) ? false : empty(trim($fieldValue)); /* array in-case of round-robin user list */
if($fieldModel->isMandatory() && $isValueEmpty){
$label = vtranslate($fieldModel->get('label'), $qualifiedModuleName);
throw new AppException(vtranslate('LBL_MANDATORY_FIELD_MISSING', 'Vtiger', $label));
} else if($fieldName == 'targetmodule' && !array_key_exists($fieldValue, $supportedModules)){
......
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