select options in FORM API from database table
12 Jun
2007
12 Jun
'07
5:41 p.m.
What is the best or preferred method for building the array for options in a select form item? The data would be coming from a database table that just holds the items for the dropdown. I know how to hard code the options, but would prefer to keep these in a db table for easy updating. Thanks, Mark
19 Jun
19 Jun
2:53 p.m.
Mark Shropshire wrote:
What is the best or preferred method for building the array for options in a select form item? The data would be coming from a database table that just holds the items for the dropdown. I know how to hard code the options, but would prefer to keep these in a db table for easy updating.
Thanks, Mark
Just query the db (db_query()) when you are building the select box for your form.
6915
Age (days ago)
6922
Last active (days ago)
1 comments
2 participants
participants (2)
-
Eric Mckenna -
Mark Shropshire