diff --git a/templates/form/field/input/edit.php b/templates/form/field/input/edit.php index 17434db..91d4ff1 100644 --- a/templates/form/field/input/edit.php +++ b/templates/form/field/input/edit.php @@ -12,18 +12,20 @@ if(mb_strlen($field->getId())){ if($bLabel){?>isMultiple()){ - foreach ($field->getValue() as $value){ + $values = $field->getValue(); + if(!is_array($values)){ + $values = []; + } + if(!count($values)){ + $values[] = ''; + } + foreach ($values as $value){ $inputAttributes = $field->getAttributes(); $inputAttributes['name'] .= '[]'; $inputAttributes['value'] = $value; ?>>getAttributes(); - $inputAttributes['name'] .= '[]'; - $inputAttributes['value'] = ''; - ?>>getAttributes(); $inputAttributes['data-dirty'] = $field->isDirty()?'true':'false';