Hide tag method one:
<?= $form->field($model, 'ee_type', ['labelOptions'=>['class'=> 'hide']])->dropDownList(YiiLib::loadDDList())?>
Hide tag method two:
<?= $form->field($model, 'ee_type')->dropDownList(YiiLib::loadDDList())->label(false) ?>
Hide tag method three:
<?= $form->field($model, 'ee_type', ['options'=>['class'=>'hide']])->dropDownList(YiiLib::loadDDList()) ?>
Supplement:
Default normal method:
<?= $form->field($model, 'ee_type')->dropDownList(YiiLib::loadDDList()) ?>
Modify tag content
<?= $form->field($model, 'ee_type')->dropDownList(YiiLib::loadDDList())->label('Welcome To <small>YiiLib.com </small>') ?>
Recommended related article tutorials: yii tutorial
The above is the detailed content of Yii2.0 implements hiding the label label in the form. For more information, please follow other related articles on the PHP Chinese website!