NYCPHP Meetup

NYPHP.org

[nycphp-talk] Storing form options.

Anthony Wlodarski ant92083 at gmail.com
Wed Jul 11 16:26:38 EDT 2012


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
ant92083 at gmail.com




More information about the talk mailing list