The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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