user2511599
user2511599

Reputation: 852

Yii2 kartik detailview hide label

If I'm doing 'label' => false, it is still showing the empty cell of the label. Is it possible completely not to render label cell somehow? Many thanks!

UPDATE: 'labelColOptions' => ['hidden' => true] works!

Upvotes: 2

Views: 881

Answers (1)

Insane Skull
Insane Skull

Reputation: 9368

You can use visible property :

For example,

[
   'attribute' => 'name',
   'value' => whatever,
   'visible' => (!empty($model->name)),
]

Upvotes: 2

Related Questions