pkjoshi
(Info)
1
I am trying to hide the label for a specific field in _form.php without success.
I have tried couple of variation like, but none is working:
<?= $form->field($model, 'sample_text')->textArea('label'=>false) ?>
<?= $form->field($model, 'sample_text')->textArea('label'=>'') ?>
What is the right approach to hide a label?
pkjoshi
(Info)
2
Ok, I found the solution.
<?= $form->field($model, 'sample_text')->textArea()->label(false) ?>
Gracias, me sirvió de mucho!!!
newbiedo
(Apsprint)
4
Not related, but if you want some custom label other than model default:
<?= $form->field($model, 'sample_text')->textArea()->label('Custom Header') ?>