Title: issue with multiple property of combogrid Post by: catpaw on October 14, 2013, 04:57:46 PM I'm using the combogrid with multiple property in a form.
I have 2 actions: Add and Edit, so when I do the Add, the combogrid it looks ok but in the php side only got the last item I selected. To correct this issue I added like a "new" parameter in the onSubmit function for the submit method. Like this: param.almacenes = $('#almacenes').combogrid('getValues'); and it works, I've got every item I selected. But when I want do a edit a register, I select it and I get a message error: The object does not accept the property or method join. In this case the combogird should load the values store in the data base in that field and I get a blank combogrid. Here's my full code: the html: the combogrid: Code: <input id="almacenes" name="almacenes" class="easyui-combogrid" style="width:240px" easyui function to save the form data: Code: function save(){ and the php code: Code: //get the variable, the field that stores this variable is varchar (100) I'm using the 1.3.2. version thank you so much *sorry for my bad english Title: Re: issue with multiple property of combogrid Post by: stworthy on October 15, 2013, 05:51:10 PM Try this.
Code: <input id="almacenes" name="almacenes[]" class="easyui-combogrid" ...> Code: //get the variable, Title: Re: issue with multiple property of combogrid Post by: catpaw on October 30, 2013, 01:02:48 PM hi thank you for your time
first change the name tag, like you said: name="almacenes[]" :D I seems reasonable but, then if I change this: $almacenes = $_POST['almacenes']; to this: $almacenes = join(',', $_POST['almacenes']); almacenes field is not saved in the database mi query insert is: $sql = "INSERT INTO table (field1, field2, field3, almacenes) values ('$value1', '$value2', '$value3', '$almacenes')"; and in the edition still do not checked the selected rows |