[eluser]coffeeandcode[/eluser]
Hi all, I'm having difficulties getting ci's form_validation library to work with an input array I have. My variable is an array of text inputs containing product quantities, indexed by product id:
Code:
Array
(
[quantities] => Array
(
[155530] => 4
[252605] => 2
[295539] => 6
[176950] => 3
[155531] => 9
[155529] => 0
[155528] => 9
[155526] => 1
[258971] => 9
[258967] => 3
[258972] => 1
[161637] => 7
[161631] => 3
)
)
The problem is, ci requires that the EXACT variable name is used everywhere, and in my case that is dynamic. I can get it to validate when I use "quantities[]" as the variable name, but then I lose the product id. Am I missing something? I would think this would be a simple thing to do...