mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
* Allows BaseHtml::activeListInput to override the field value, to follow BaseHtml::activeInput which already allows it
This commit is contained in:
@ -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'] = '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user