EasyUI Forum
November 05, 2025, 03:03:09 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: Bug ComboTree? Generated <input>'s without array[]  (Read 12743 times)
catasoft
Newbie
*
Posts: 10


View Profile Email
« on: October 19, 2012, 02:11:06 AM »

Simple code:
Code:
<select id="tt" class="easyui-combotree"  
   data-options="required:true,onlyLeafCheck:false,checkbox:true,cascadeCheck:true,required:true"
   multiple style="width:300px;" name="test">
</select>

When I check the options, one by one, new <input type="hidden" name="test">'s appear for each checked option.
BUT they don't have the name with [] in the end, which results in only the first input's value being posted, instead of an array.
Shouldn't they be <input type="hidden" name="test[]" />?
Is this a bug? Am I missing something in the config part?
Thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 19, 2012, 02:29:10 AM »

It is not a bug. To post name with [] to server, use the following code instead:
Code:
<select id="tt" class="easyui-combotree"  
   data-options="required:true,onlyLeafCheck:false,checkbox:true,cascadeCheck:true,required:true"
   multiple style="width:300px;" name="test[]">
</select>
Logged
catasoft
Newbie
*
Posts: 10


View Profile Email
« Reply #2 on: October 24, 2012, 12:35:38 AM »

Thanks. Worked.
I had tried it, but there was an if and only had placed it on one branch Smiley.
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!