您的位置 首页 技术

yii2.0实现隐藏form中的label标签

隐藏标签方式一: <?= $form->field($model, 'ee_type', ['labelOptions'=&gt…

隐藏标签方式一:

<?= $form->field($model, 'ee_type', ['labelOptions'=>['class'=> 'hide']])->dropDownList(YiiLib::loadDDList())?>

隐藏标签方式二:

<?= $form->field($model, 'ee_type')->dropDownList(YiiLib::loadDDList())->label(false) ?>

隐藏标签方式三:

<?= $form->field($model, 'ee_type', ['options'=>['class'=>'hide']])->dropDownList(YiiLib::loadDDList()) ?>

补充:

默认常规方式:

<?= $form->field($model, 'ee_type')->dropDownList(YiiLib::loadDDList()) ?>

修改标签内容

<?= $form->field($model, 'ee_type')->dropDownList(YiiLib::loadDDList())->label('Welcome To <small>YiiLib.com </small>') ?>

相关文章教程推荐:yii教程

以上就是yii2.0实现隐藏form中的label标签的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/24210.html

为您推荐

返回顶部