Dears,
I’m new to Yii, and I’m using the CRUD tool to interface to database.
I’ve a database field called “combo” DECIMAL(1,0), I’ve two issues with him:
1st: how can I bind him to the database field, I did the following in the _form.php
<div class="row">
<?php echo $form->labelEx($model,'COMBO'); ?>
<?php echo CHtml::checkBox('COMBO',$model->COMBO); ?>
<?php echo $form->error($model,'COMBO'); ?>
</div>
when the value is 1 it didn’t check the checkbox, or even when I create a new item it doesn’t affect the database for nothing.
2nd: how can I implement a JavaScript function like onClick event, I want to show/hide a div when checked changed, whether its value comes from the database or a user clicks on it.
Finally, thanks for your patience.