I’m new to Yii framework and I’m designing a multiselect dropdownlist, where I want to populate the values based on a XML file using jQuery Ajax.
Let me explain abou the scenario succintly, so that I can make it clear for what I want-
-
I’m using web services to get the XML from a cross domain link, which fetches the values inside XML tags to populate the options inside the dropdownlist of the form (_form.php).
-
I’m using jQuery eric hynds plugin to use the existing dropdownlist in _form.php to Multiselect dropdownlist.
My Query is - Is it the right way to do it, I tried Yii extension ech-multiselect, but I did not implement it.
- How do I populate values to the selection menu using jQuery Ajax in Yii framework.
<?php echo $form->labelEx($model,'selectionList'); ?>
<?php echo $form->dropDownList($model,'selectionList',array('rows'=>6, 'cols'=>50),array('class'=>'multiselect')); ?>
<?php echo $form->error($model,'selectionList'); ?>
Now, how do I populate the array for options in the above selectionlist.