i just need to know how be selected
this is my code
$model= Relatedproductsview::model()->findByAttributes(array('products_id'=>$_GET['id']) );
// complete user list to be shown at multiselect order by username
$users= Products::model()->findAll(
array('order' => 'id'));
$this->widget('application.extensions.jmultiselect2side.Jmultiselect2side',array(
'name'=>'relatedproducts[]',
'model'=>$model, 'attribute'=>'title', //selected items
'labelsx'=>'Available',
'labeldx'=>'Selected',
'list'=>CHtml::listData($users,'id', 'title') ,
));
in ‘atrribute’ ( i know there is the selected id-> key to be selected )
and i know ‘model’ must have same field with ‘list’
i have succesfully used this widget ( with selected list )
but unfortunately i cant selected all data on my database
if i acn describe clearly
i have 1 product and this product have 5 category
by example
table product (id, title)
table relatedproduct(id , products_id,related_id)
id->auto increment
products_id -> id
related_id ->id products that related
(
example :
1,1,4
2,1,2
3,1,3
i have products with id =1 and related with 4,2,3
)
to use this extensions correctly i create view ( same with ‘list’ field )
nah, in my view i just get on row selected
need help…