I have this setup where I select as many orders as I want, it brings all the important information from the orders onto a single page where I can review and make changes if needed then export.

Problem:
I use text boxes so that I may edit the information, if I select multiple orders.. all of the text boxes will have the same name.

How would you code this so that each order has a different prefix for their text box names? The data also has to be read by an export script, so I would need to loop it there as well to read the text boxes. Any ideas?

    name="foo[]"

    then its automatically shoved in to a numeric array called foo

      Do you know how I'd implement that using smarty templates? There is a bit of the code below, it's pretty basic, just got to get each name specific to one order. What kind of loop would I start?

      <input type="text" name="name" value="{$order.firstname} {$order.lastname}"><br>

        The page with the text boxes is obviously in a loop itself from another page. It just goes down the code putting all the information in and then I have many orders showing up on the same page but they all use the same name for the text boxes.

          I have never used smarty, suggest you try a smarty forum as anything i suggest may not work with it

            I have never used smarty, suggest you try a smarty forum as anything i suggest may not work with it

            is what i would do with out smarty

            <input type="text" name="name[]" value="{$order.firstname} {$order.lastname}"><br>

            then you can loop through the name array

              Ah, I got it.. thanks.

                Write a Reply...