Autocomplete

Autocomplete

I am implementing Autocomplete in a form using jQuery. The plugin displays selected value with , separator.
I also need it's respective fetched id from database in comma separator. Instead the lated value override the previous one. 
I tried to use push operation couldn't.
  1. <?php $this->widget('CAutoComplete',
  2. array(
  3.       //name of the html field that will be generated
  4.   'name'=>'user_name[]', 
  5.       //replace controller/action with real ids
  6.   'url'=>array('Privacy/autoCompleteLookup'), 
  7.   'max'=>10, //specifies the max number of items to display
  8.       
  9.       //specifies the number of chars that must be entered 
  10.       //before autocomplete initiates a lookup
  11.   'minChars'=>1, 
  12.   'delay'=>200, //number of milliseconds before lookup occurs
  13.   'matchCase'=>false, //match case when performing a lookup?
  14.       
  15.       //any additional html attributes that go inside of 
  16.       //the input field can be defined here
  17.   'htmlOptions'=>array('size'=>'40'), 
  18.       
  19.   'methodChain'=>".result(function(event,item){\$(\"#allow\").val(item[1]); \$(\"#allow\").prepend($(20));})",
  20.   'multiple' => true,
  21. ));
  22.  ?>
  23. <?php echo CHtml::hiddenField('allow'); ?> // its equivalent html form is : <input type="hidden" name="allow" >
jQuery part is in line number 20 and the record's is should be in hidden form line number 24

Thank you for your support.