From 13c05ef3fabeb42101a46d6f58d2dbc9edc45a6d Mon Sep 17 00:00:00 2001 From: Rangel Reale Date: Sat, 20 Aug 2016 13:33:12 -0300 Subject: [PATCH] * Allows BaseHtml::activeListInput to override the field value, to follow BaseHtml::activeInput which already allows it --- framework/helpers/BaseHtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index d5e5fd6c28..be655cb713 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -1648,7 +1648,7 @@ class BaseHtml protected static function activeListInput($type, $model, $attribute, $items, $options = []) { $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)) { $options['unselect'] = ''; }