Commit bbc02266 by Alexander Kochetov

BaseHtml::activeDropDownList() fix for 'multiple' mode

parent f55ce7e0
...@@ -1222,6 +1222,9 @@ class BaseHtml ...@@ -1222,6 +1222,9 @@ class BaseHtml
*/ */
public static function activeDropDownList($model, $attribute, $items, $options = []) public static function activeDropDownList($model, $attribute, $items, $options = [])
{ {
if (!empty($options['multiple'])) {
return static::activeListBox($model, $attribute, $items, $options);
}
$name = isset($options['name']) ? $options['name'] : static::getInputName($model, $attribute); $name = isset($options['name']) ? $options['name'] : static::getInputName($model, $attribute);
$selection = static::getAttributeValue($model, $attribute); $selection = static::getAttributeValue($model, $attribute);
if (!array_key_exists('id', $options)) { if (!array_key_exists('id', $options)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment