The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
[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 And table 2 is called Ratings: Code: ID app_id rating 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 |