http://qs321.pair.com?node_id=1165306


in reply to Re^2: dynamically built form getting data parameters
in thread dynamically built form getting data parameters

The problem with multiple values in an array is that a checkbox field will not exist in the values sent by the form unless it is checked. In your example, if you kept the names the same and only one checkbox was ticked it would come in like this:
Professor => ["Doe, Jane","Smith, Josh"], IDNum => ["0116411160645","0116411162016"], Status => "KEEP THIS ITEM",
You have no way of telling which item this refers to. So you will need to group each item somehow, and I think your idea of incrementing is fine, as long as you do it to all parameters as hippo points out.

Replies are listed 'Best First'.
Re^4: dynamically built form getting data parameters
by hippo (Bishop) on Jun 10, 2016 at 15:59 UTC

    Excellent point. The easy alternative is to replace the checkboxes with selects which just have "Yes" and "No" as options. Not as clean from a UI point of view, though.

    Yet another option is to set the values of the checkboxes to a unique identifier like the IDNum (assuming it is unique) and that way you know which ones are to be kept.

    There's also the JS option, but I like that least of all.

    TIMTOWTDI!

Re^4: dynamically built form getting data parameters
by golroch (Initiate) on Jun 10, 2016 at 16:29 UTC
    Thanks everyone for the help and great information. The modules mentioned look promising, sadly they are not on installed on my system. Going to code it the long way as your right, I won't know which books have been checked.