代码如下:= $form->field($model, 'status')->radioList(['0'=>'有效','1'=>'无效'],['class'=>'label-group'])->label('状态'); ?>
我如何在选项中添加首选参数,看了源码好像没发现?label('状态',[参数])这里加$options好像也没用。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你所谓的首选参数是指radioList的默认选中的radio么?如果是,只需设置
$model->status = 1就可以默认选中“无效”了。异或是你这里的首选参数指的是别的?