[support] select options in FORM API from database table

Eric Mckenna eric.mckenna at gmail.com
Tue Jun 19 12:53:30 UTC 2007


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.


More information about the support mailing list