The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Dynamic select box data - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Dynamic select box data (/showthread.php?tid=707) |
Dynamic select box data - Rocket Music - May 18th, 2010 Is there a general (or any) way that Form Tools can handle a dynamically generated option list for a select (drop down menu or other). I need two select boxes where a second menu selection is dependent on the item selected in the first menu selection. For example, I have an item with options, a product with different color options - Item1 is available in black or white, and Item2 in red or blue. First you select the Item from a drop down menu, then the sub-option is generated with the respective sub-option (colors). I can create the form (many ways), but I can't figure out how to set it up in Form Tools so that the second option selection gets recognized in setup and recorded properly in use. I have 3 form elements, each with about 10 options, and there are about 4 different sets of color options used in each element. There are 3 to 5 different colors depending on the option. Total of about 10 or so different colors. So, it's a fairly complex array of options, but not too overwhelming. Any ideas?? thanks !!! Dan RE: Dynamic select box data - iroast - May 24th, 2010 Not sure, but you can configure the form with all the colors and then once the form tool setup process for that form is done, you can go back to the form and use JS or whatever scripting language to dynmically select the appropriate color set. As long as the names are the same (field/select menu), I don't think form tools would care how you display the color sets. RE: Dynamic select box data - Rocket Music - May 27th, 2010 I think I follow you. I think that's basically the same thing as just having a bunch of field/select menus that normally don't get filled, i.e. you might have 5 fields and only one gets used. The problem with that is that you end up with a bunch of blank data cells when the submitted data gets viewed. It works, but it's messy. If there was a way to hide unused fields when viewing.... anyway, thanks !!!! Dan |