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



Form Tools
[RESOLVED] Do dropdown options from existing table store primary key? - 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: [RESOLVED] Do dropdown options from existing table store primary key? (/showthread.php?tid=2205)



[RESOLVED] Do dropdown options from existing table store primary key? - jsherk - Sep 18th, 2012

Okay, so have been playing with form tools for a couple hours and this is better than everything else out there I have tried!

One question I have, which I could not find in the documentation, has to do with using a dropdown to pick a value from another table.

So table 1 is called MyApps:
Code:
ID    app_name
1     Angry Birds
2     Where's My Water

And table 2 is called Ratings:
Code:
ID    app_id    rating
1     2            fun
2     1            great
3     1            terrible
So when setting up a dropdown for the app_id field in table 2, I can choose the ID field from table 1, which works fine.

The only problem is, that although I need to choose the ID from table 1 and store that under app_id in table 2, I do not want the drop down list to show me the ID numbers, but instead want it to show me the app_name field.

When editing the Dropdown Settings it allows me to choose the Form Field Contents (table 1 in my example) and then it allows me to Select Field (ID in this case) but I do not see how I can choose the value of one field while showing the text from another.

Thanks



RE: Dropdown options from existing table - jsherk - Sep 20th, 2012

[RESOLVED]

When looking in the database, it seems that Form Tools is smart enough to store the the ID field of the MyApps table in the app_id field of the Ratings table, even when I choose the dropdown to display the app_name of MyApps table.

So Form Tools is storing the primary key from the other table, regardless of which field in that other table you choose to display in the dropdown.

Thanks