diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 182647c2fb..a3324e8b4d 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -2207,12 +2207,12 @@ class etemplate extends boetemplate self::set_array($content,$form_name,$value); break; case 'checkbox': - if (!$value) + if (!$value && $attr['needed']) + { + self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),''); + } + if ($value === false) { - if ($attr['needed']) - { - self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),''); - } self::set_array($content,$form_name,$attr['multiple'] ? array() : $attr['unset_value']); // need to be reported too } else