EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: catasoft on October 19, 2012, 02:11:06 AM



Title: Bug ComboTree? Generated <input>'s without array[]
Post by: catasoft 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


Title: Re: Bug ComboTree? Generated <input>'s without array[]
Post by: stworthy 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>


Title: Re: Bug ComboTree? Generated <input>'s without array[]
Post by: catasoft 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 :).