Welcome Guest, Not a member yet? Register   Sign In
Form validation multidimensional arrays
#1

[eluser]P.T.[/eluser]
I know it is possible to do a form validation on arrays like this:

Code:
<input type="text" name="values[]" />
<input type="text" name="values[sports]" />
<input type="text" name="values[nba]" />

But, I need an array like this:

Code:
<input type="text" name="values[][action]" />

But that doesn't seem to work. Neither when I change it to:


Code:
<input type="text" name="values[0][action]" />

Since I do not know the length of the array, I can neither do a form validation on values[0][action], values[1][action], etc. Does anyone have a suggestion? Is this a bug in CI?
#2

[eluser]Unknown[/eluser]
I had the same problem. I do not know the length of the array and have to use name="values[][action]" ( just an example). Is there any suggestion what I should do?




Theme © iAndrew 2016 - Forum software by © MyBB