EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: MFS on July 28, 2017, 01:21:04 PM



Title: Multivalue in combobox
Post by: MFS on July 28, 2017, 01:21:04 PM
Hello.
I have a combobox with some values.
I want to post as one sting, but I always recive two valus like this SRadnik=1&SRadnik=6 or other values but in this format.
I need it in format SRadnik='1,6'.
How to fix it?
This is my form:

Code:
									<div class="easyui-tabs" style="width:456px;height:85px">
<div title="Podaci" style="padding:10px">
<div class="fitem">
<label>Serviser:</label>
<input id="SRadnik" class="easyui-combobox" name="SRadnik" multiple="multiple" editable="false" multivalue="false" data-options="valueField:'Sifra',textField:'ImePrezime',url:'Pomocni/LookSRadnik.php'"  required="true" >
<script>
$('#SRadnik').combobox({
  formatter:function(row){
var opts = $(this).combobox('options');
return '<input type="checkbox" class="combobox-checkbox">' + row[opts.textField]
  },
  onSelect:function(row){
console.log(row)
var opts = $(this).combobox('options');
var el = opts.finder.getEl(this, row[opts.valueField]);
el.find('input.combobox-checkbox')._propAttr('checked', true);
  },
  onUnselect:function(row){
var opts = $(this).combobox('options');
var el = opts.finder.getEl(this, row[opts.valueField]);
el.find('input.combobox-checkbox')._propAttr('checked', false);
  }
})
</script>
</div>
</div>
</div>


Title: Re: Multivalue in combobox
Post by: jarry on July 29, 2017, 12:00:29 AM
Please look at this example http://code.reloado.com/ofomus4/edit#preview. It works fine.