If we change the id from a $form->listBox(…), the listBox stops working (no validating, ajax call, etc). It’s possible to make the new id, acting like the id that comes from model ?
Changing this
...
$form->listBox($item, 'category_id', CHtml::listData(Category::model()->findAll('parent_id IS NULL'), 'id', 'name'),
...
into this
...
$form->listBox($item, 'category_id', CHtml::listData(Category::model()->findAll('parent_id IS NULL'), 'id', 'name'), array('id'=>'parent'),
...
Well, the idea is to change the listBox values, depending on what value you choose from other, but this causes the listbox to stop working. Also you “can’t” have more then 1 form element with the same id, if you want to make something dependent.