2017-03-04 18:41:03 2079次浏览 2条回答 1 悬赏 20 金钱

请问checkboxList 怎么设置template和labelOptions,inputOptions
eg:

<?= $form->field($model, 'store_list')->checkboxList(
    ['0'=>'篮球','1'=>'足球','2'=>'羽毛球','3'=>'乒乓球'],
    ['CheckboxListTemplate' => '{input}'],
    [
      'itemOptions' => [
           'class' => ['class' => 'flat']
      ]
    ]
)
?>

我这上面写的不对,请问该如何写呢?

  • 回答于 2017-03-04 19:06 举报

    <?= $form->field($model, 'modules_name',['template'=>"

    {label}\n{input}\n{hint}\n{error}"])->textInput() ?>
    2 条回复
    回复于 2017-03-04 19:35 回复

    我需要的是对 checkboxList 里面的html进行设置template。而不是field 中的

    回复于 2017-03-04 20:24 回复

    so? checkboxList 里有input ?

  • 回答于 2017-03-05 10:35 举报

    htmlpOptions

您需要登录后才可以回答。登录 | 立即注册
acking
总监

acking 上海

注册时间:2012-05-16
最后登录:2024-04-16
在线时长:65小时44分
  • 粉丝13
  • 金钱2560
  • 威望0
  • 积分3210

热门问题