Skip to content

Commit

Permalink
fixed element's prefix name generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Tupikov committed Aug 31, 2015
1 parent 8a1d44b commit 7d045ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MultipleInputColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private function getInputNamePrefix()
{
$model = $this->widget->model;
if ($model instanceof Model) {
if (count($this->renderer->columns) > 1 && $this->hasModelAttribute($this->name)) {
if (empty($this->renderer->columns) || (count($this->renderer->columns) == 1 && $this->hasModelAttribute($this->name))) {
return $model->formName();
}
return Html::getInputName($this->widget->model, $this->widget->attribute);
Expand Down

0 comments on commit 7d045ba

Please sign in to comment.