EasyUI Forum
May 03, 2024, 11:58:01 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Multivalue in combobox  (Read 4926 times)
MFS
Newbie
*
Posts: 47



View Profile
« 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>
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: July 29, 2017, 12:00:29 AM »

Please look at this example http://code.reloado.com/ofomus4/edit#preview. It works fine.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!