Checkbox Instead Of Label

Hello everyone,

As you probably have read this kind of sentence couple of times… I am just starting with yii… :)

I have DB table called "Suppliers". I am trying to set some kind of special field that say if supplier is

"active" or not - for that I would like to place checkbox on my list and set checkbox to checked in case if field value is 1 and unchecked in case if value is 0.

From the other hand on Create/update page I would like to set something similar - update field in DB with 1 when checkbox is checked and set value to 0 when checkbox in unchecked.

I’ll be grateful for any suggestions.



Sorry! looks like I was not searching enough.

Here is an answer: