Dear forum fellows,
I have a multi select drop down list like this:
<div class="row">
<?php echo $form->labelEx($model,'user_mgmt'); ?>
<?php
$items = array('1'=>'add','2'=>'edit','4'=>'delete');
$options = array('multiple' => 'multiple', 'data-rel'=>'chosen');
echo $form->dropDownList($model,'user_mgmt', $items, $options);
?>
<?php echo $form->error($model,'user_mgmt'); ?>
</div>
and in my model I have a user_mgmt field which store a single integer (e.g. 1 means able to add user, 5 means add+delete, etc.). Problem is when the form is submit, the value will looks like this: 1,2,4 or 2,4 etc. How can I solve this problem? Can jquery do it? Thank you!