Well, for the number of children and the floor  number, you'll want to
generate the dropdown values programatically, not store 0, 1, 2, …,
'10 or more' in a table. So you'd put an entry in the application
config file for the maximum number of children and maximum floor
number, and create the choices array for the choice widget in the
controller (I guess).

For the other values, you could use the method described in the Jobeet
tutorial, in “Day 10: The Forms”, under “Customizing the Job Form”:

> Even if the type column is also a varchar in the schema, we want its value to 
> be restricted to a list of choices: full time, part time, or freelance.
>
> First, let's define the possible values in JobeetJobTable:

Then you can either store the possible values in a config file or in a
table (I wouldn't put them directly in the model like it's done
there). If you think you'd want to add an interface to add more titles
or languages, go for a database table. Anyway, if you change your mind
after a while, you only need to change the getTitles() and
getLanguages() methods (corresponding to getTypes() in the tutorial).

Not a very definitive answer, but I hope it helps a bit.

Olivier

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to