EasyUI Forum
April 24, 2024, 09:03:13 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: Combogrid multiple select options to send values and load values  (Read 1786 times)
serit
Newbie
*
Posts: 4


View Profile Email
« on: February 03, 2022, 10:10:26 AM »

How to use combogrid with multiple select options to send values in form and load values on load form for edit?
I Have my code ;

Code:
<select required="" class="easyui-combogrid combogrid-f combo-f textbox-f" id="contracts_tickets" style="width: 100%; display: none;" data-options="
panelWidth: '20%',
multiple:true,
idField: 'phc_cognitive_contracts',
textField: 'local_contracts',
url: 'lib/tableActions.php?table=contracts',
columns: [[{'field':'phc_cognitive_contracts','title':'<b lang=en>Phc cognitive</b>','sortable':'true'},{'field':'commercial_name_contracts','title':'<b lang=en>Commercial name</b>','sortable':'true'},{'field':'telefonica_contracts','title':'<b lang=en>Telefonica</b>','sortable':'true'},{'field':'local_contracts','title':'<b lang=en>Local</b>','sortable':'true'}]],
fitColumns: true,
label: '<b lang=en>Contracts</b>',
labelPosition: 'top'
" textboxname="contracts_tickets[]" comboname="contracts_tickets[]">
</select>

If I use on tag name contracts_tickets[] I can save the multiples values on my database with comma separated values.
But I can't load the values on form load

If I use just the name contracts_tickets without [] send with same name the multiple values for form but I only can save the last value and it's possible to load at least one value on form load for edit.

Can you help me?
thanks in advance
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: February 06, 2022, 03:10:33 AM »

You should load the multiple fields with an array value. Please refer to the code below.
Code:
$('#ff').form('load', {
  'contracts_tickets[]': [v1,v2]
  ...
});
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!