Hello:
I am trying to do a matrix type of form for entering quantities on a grid system. I am having a challenge with the naming of the input fields to correspond with the value.
Here is the example of what the stripped down form matrix looks like. The Q's represent the input fields and are the quantity entered. The top are stores and the left side are sizes.
1 2
8 Q Q
9 Q Q
How would I go about naming the form variable? I have tried the following, but I don't know if this is correct using a muli-dimensional array.:
<input type="text" name="quantity[Size1][1][]">
<input type="text" name="quantity[Size1][2][]">
<br>
<input type="text" name="quantity[Size2][1][]">
<input type="text" name="quantity[Size2][2][]">
Then on the server side once the form has been submitted I would like to loop through the array extracting the keys and quantity entered for the input fields.
So you would end up with something like the following if you filled out 2 fields:
Store Size Quantity
1 8 10
2 9 6
I don't know if I am going about this in the right way I just need a little help and direction on the best way to proceed. Any examples would be helpful also
Thanks,
Troy