我在ActiveForm中有4个radioList(),我知道如何自定义一个radioList()
像这样:
$form->field($model, 'type')->radioList(['A', 'B'], [
'item' => function($index, $label, $name, $checked, $value){
return 'template';
}
])
我不想为每个radioList()写这个。 有没有办法在activeForm fieldConfig中编写此代码并应用所有radioList()。