Home>Article>PHP Framework> Yii2.0 implements hiding the label label in the form

Yii2.0 implements hiding the label label in the form

王林
王林 Original
2019-12-24 14:54:48 3133browse

Yii2.0 implements hiding the label label in the form

Hide tag method one:

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

Hide tag method two:

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

Hide tag method three:

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

Supplement:

Default normal method:

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

Modify tag content

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

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn