Home > PHP Framework > YII > body text

Yii2.0 implements hiding the label label in the form

王林
Release: 2019-12-24 14:55:23
Original
3296 people have browsed it

Yii2.0 implements hiding the label label in the form

Hide tag method one:

<?= $form->field($model, &#39;ee_type&#39;, [&#39;labelOptions&#39;=>[&#39;class&#39;=> &#39;hide&#39;]])->dropDownList(YiiLib::loadDDList())?>
Copy after login

Hide tag method two:

<?= $form->field($model, &#39;ee_type&#39;)->dropDownList(YiiLib::loadDDList())->label(false) ?>
Copy after login

Hide tag method three:

<?= $form->field($model, &#39;ee_type&#39;, [&#39;options&#39;=>[&#39;class&#39;=>&#39;hide&#39;]])->dropDownList(YiiLib::loadDDList()) ?>
Copy after login

Supplement:

Default normal method:

<?= $form->field($model, &#39;ee_type&#39;)->dropDownList(YiiLib::loadDDList()) ?>
Copy after login

Modify tag content

<?= $form->field($model, &#39;ee_type&#39;)->dropDownList(YiiLib::loadDDList())->label(&#39;Welcome To 
<small>YiiLib.com </small>&#39;) ?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template