Hello
I'm just starting with Yii, I use an activeCheckBox and an activeTextField
I want when I click on checkbox, display or not activeTextField ?
I think is very simple, but I dont how.
Thanks for your response
Hello
I'm just starting with Yii, I use an activeCheckBox and an activeTextField
I want when I click on checkbox, display or not activeTextField ?
I think is very simple, but I dont how.
Thanks for your response
This is purely js manipulation. You may refer to the following code which can be placed in a view:
Yii::app()->clientScript->registerScript('click',
'$("#CheckBoxID").click(function(){
$("#TextInputID").toggle($("input['#CheckBoxID'].attr('checked'));
});'
);
Thanks for your response
After some test it works like this
Yii::app()->clientScript->registerScript('click',
'$("#CheckBoxID").click(function(){
$("#TextInputID").toggle($("#CheckBoxID").checked);
});'
);