How To Save Content From Yii Widget To Database?

here is the ListBuilder Widget code:




$this->widget('ext.widgets.multiselects.XMultiSelects',array(

'leftTitle'=>'Australia',

'leftName'=>'Person[australia][]',

'leftList'=>Person::model()->findUsersByCountry(14),

'rightTitle'=>'New Zealand',

'rightName'=>'Person[newzealand][]',

'rightList'=>Person::model()->findUsersByCountry(158),

'size'=>20,

'width'=>'200px',

));



This is how ListBuilder looks like:

I wanna save that entire list i select to right list on to my DB.

how to do this?

use a form tags to save the form like below given code.




<?php echo CHtml::beginForm(); ?>


<?php 

$this->widget('ext.widgets.multiselects.XMultiSelects',array(

'leftTitle'=>'Australia',

'leftName'=>'Person[australia][]',

'leftList'=>Person::model()->findUsersByCountry(14),

'rightTitle'=>'New Zealand',

'rightName'=>'Person[newzealand][]',

'rightList'=>Person::model()->findUsersByCountry(158),

'size'=>20,

'width'=>'200px',

));

?>

   <div class="row submit">

        <?php echo CHtml::submitButton('Login'); ?>

    </div>

 

<?php echo CHtml::endForm(); ?>



Let’s give it a try and see. are you able to save it or not.make sure you have define a form action also.

Nope,

I added the button as you said,

But, Button seems not working it’s doing nothing.

can you please provide me XMultiSelect.php?

or any link for complete multiselect extension.

thanyou.