jeudi 16 novembre 2017

yii2 - How to make checkbox visible with conditional logic

I need help to make my checkbox visible if the status is 3.

Here my view code :

//Checkbox
            [
              'class' => 'yii\grid\CheckboxColumn',
              'contentOptions'=>['style'=>'width: 50px'],
              'checkboxOptions'=> function($model, $key, $index, $column) {
                return ["value" => $model->ACCOUNT_ID];
              },
              'visible' => $model->STATUS_INSTALLMENT == 3
            ],

I run that code and it cause my checkbox disappear.

Aucun commentaire:

Enregistrer un commentaire