G
Guest
I have a form that contains four drop-down boxes, one box each for a specific
item (item1, item2, item3, item4). Each drop-down box has four choices (1, 2,
3, 4). So for each Item, the user can select how many of that item they want,
up to four. For example they can select a quantity of 2 for item1, 3 for
item2, 1 for item3 and 4 for item4. They then click submit.
All that works without a problem. What I want however, is to limit the TOTAL
number of items selected from all four items. They can select 1 through 4 in
each drop-down but I don't want the total number of items to exceed 14. So if
they selected 4 in all four boxes, I would need someway to count this and pop
up a message that says something like "you have exceeded the total items
allowed". I assume this count and validation would need to happen when they
click the Submit button.
How do I do this count and validation.
Thanks... Mike
item (item1, item2, item3, item4). Each drop-down box has four choices (1, 2,
3, 4). So for each Item, the user can select how many of that item they want,
up to four. For example they can select a quantity of 2 for item1, 3 for
item2, 1 for item3 and 4 for item4. They then click submit.
All that works without a problem. What I want however, is to limit the TOTAL
number of items selected from all four items. They can select 1 through 4 in
each drop-down but I don't want the total number of items to exceed 14. So if
they selected 4 in all four boxes, I would need someway to count this and pop
up a message that says something like "you have exceeded the total items
allowed". I assume this count and validation would need to happen when they
click the Submit button.
How do I do this count and validation.
Thanks... Mike