Inserting multiple form fields with same name |
[eluser]Dede[/eluser]
Hi This is my first post here, so please if I missed the correct forum thread, I'm sorry in advance. I'm starting CI, and really like it, but have some trouble that cannot solve for few days. I have a form with 4 fields in view: Code: <?php As you can see, there's an "Add another room type" button on top of the form which lets me add the same form again under the first one, and the process can be repeated up to 5 forms, meaning I can insert (well, not exactly, since I haven't found a solution :red 5 different room types with different occupancy, etc. The other form fields are added with jQuery, and have the same names as the above posted. In short, when I submit the form with e.g 3 sets of room types, I got the following multidimensional array: Code: Array I cannot find a way to sort the array in following format: Code: $insert_array = array( Also, I'm using info from http://ellislab.com/codeigniter/user-gui...ysasfields and cannot validate appropriately. What is the best practice to make DB inserts using AC for this type of form? Thanks in advance |
Messages In This Thread |
Inserting multiple form fields with same name - by El Forum - 03-01-2012, 07:05 PM
Inserting multiple form fields with same name - by El Forum - 03-01-2012, 11:46 PM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 08:41 AM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 08:50 AM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 11:20 AM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 09:44 PM
|