* Allows BaseHtml::activeListInput to override the field value, to follow BaseHtml::activeInput which already allows it

This commit is contained in:
Rangel Reale
2016-08-20 13:33:12 -03:00
parent bc03f89f67
commit 13c05ef3fa

View File

@ -1648,7 +1648,7 @@ class BaseHtml
protected static function activeListInput($type, $model, $attribute, $items, $options = []) protected static function activeListInput($type, $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 = isset($options['value']) ? $options['value'] : static::getAttributeValue($model, $attribute);
if (!array_key_exists('unselect', $options)) { if (!array_key_exists('unselect', $options)) {
$options['unselect'] = ''; $options['unselect'] = '';
} }