mvc: multiselect may allow empty option, no need to give blank item too

This commit is contained in:
Franco Fichtner 2018-07-05 12:23:11 +00:00
parent 20f41070bc
commit c0838ddfc0

View File

@ -189,7 +189,7 @@ class ModelRelationField extends BaseField
if (isset(self::$internalOptionList[$this->internalCacheKey]) &&
is_array(self::$internalOptionList[$this->internalCacheKey])) {
// if relation is not required, add empty option
if (!$this->internalIsRequired) {
if (!$this->internalIsRequired && !$this->internalMultiSelect) {
$result[""] = array("value"=>"none", "selected" => 0);
}