1. Bogdan Savluk
  2. yii-chosen

Commits

Bogdan Savluk  committed 8058f14

Fixed bug when resolving value by attribute name

  • Participants
  • Parent commits 378e7c8
  • Branches default

Comments (0)

Files changed (1)

File Chosen.php

View file
  • Ignore whitespace
             echo CHtml::hiddenField(substr($name, 0,-2), '', array('id' => false));
         }
         if (isset($this->model)) {
-            echo CHtml::dropDownList($name, CHtml::value($this->model, $this->attribute), $this->data, $this->htmlOptions);
+            echo CHtml::dropDownList($name, CHtml::resolveValue($this->model, $this->attribute), $this->data, $this->htmlOptions);
         } else {
             echo CHtml::dropDownList($name, $this->value, $this->data, $this->htmlOptions);
         }