输入banner图图片脚本导航/分类

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

隐藏标签方式一:

<?= $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标签的详细内容,更多请关注Gxlcms其它相关文章!