I would personally store any form options in a database table, I would have a form table and then a form_options table and get all options by form id.
Thanks, Joseph Crawford On Wed, Jul 11, 2012 at 4:26 PM, Anthony Wlodarski <ant92...@gmail.com>wrote: > When building lots of forms, irrespective of form size or complexity if > you need to store options where do you do it? I have seen many examples > but I guess this boils down to what is a best practice? The way things are > currently done is that all form options are stored in a static array in the > ecosystem and then called upon when the form needs to be built. > > For example, we ask users to select their Ethnicity when filling out one > of our forms. This includes the values: Prefer not to say, African > American, Asian, White, East Indian, Hispanic / Latino, Middle Eastern, > Native American, Other. Where would you store these options? > > Is this a matter of personal preference or is there a best practice I > missed over the years? > > -- > Anthony W. > http://www.anthonyw.net > ant92...@gmail.com > > ______________________________**_________________ > New York PHP User Group Community Talk Mailing List > http://lists.nyphp.org/**mailman/listinfo/talk<http://lists.nyphp.org/mailman/listinfo/talk> > > http://www.nyphp.org/show-**participation<http://www.nyphp.org/show-participation> > -- Joseph Crawford Jr. Zend Certified Engineer http://www.josephcrawford.com/ 1-781-346-9656 i...@josephcrawford.com
_______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show-participation