Skip to content

Commit 7d045ba

Browse files
author
Eugene Tupikov
committed
fixed element's prefix name generation
1 parent 8a1d44b commit 7d045ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MultipleInputColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private function getInputNamePrefix()
6565
{
6666
$model = $this->widget->model;
6767
if ($model instanceof Model) {
68-
if (count($this->renderer->columns) > 1 && $this->hasModelAttribute($this->name)) {
68+
if (empty($this->renderer->columns) || (count($this->renderer->columns) == 1 && $this->hasModelAttribute($this->name))) {
6969
return $model->formName();
7070
}
7171
return Html::getInputName($this->widget->model, $this->widget->attribute);

0 commit comments

Comments
 (0)