mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -12,18 +12,20 @@ if(mb_strlen($field->getId())){
|
||||
if($bLabel){?><label <?=Tools::getAttrByArray($labelAttrs)?>><?=$field->getLabel()?></label><?}
|
||||
|
||||
if($field->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;
|
||||
?><input <?=Tools::getAttrByArray($inputAttributes)?>><?
|
||||
echo "\n\r";
|
||||
}
|
||||
$inputAttributes = $field->getAttributes();
|
||||
$inputAttributes['name'] .= '[]';
|
||||
$inputAttributes['value'] = '';
|
||||
?><input <?=Tools::getAttrByArray($inputAttributes)?>><?
|
||||
echo "\n\r";
|
||||
} else {
|
||||
$inputAttributes = $field->getAttributes();
|
||||
$inputAttributes['data-dirty'] = $field->isDirty()?'true':'false';
|
||||
|
||||
Reference in New Issue
Block a user