On Tue, 11 Aug 2009, caphun wrote:
It seems like the include_custom parameter was dropped from
generator.yml in Symfony 1.2 but I could not find any documentation on
alternatives.
Looking at the 1.0 documentation (http://www.symfony-project.org/book/
1_0/14-Generators) under listing 14-6
On Wed, Aug 12, 2009 at 11:00 PM, Eno symb...@gmail.com wrote:
If you look at the code, you'll see its still there in 1.1 and 1.2.
Hmm, but params: include_custom='Choose an option', doesn't work in 1.2.
Given the above the first option in my drop down should be:
option value=Choose an
Hey Caphun,
I believe the place to handle this stuff is in the form classes now,
and I find that a better place as well, since it affects all instances
of a form and you can adjust the validator at the same time as well
(assuming you need to tell it to allow an empty submission or not..).
Hope
Hey Daniel,
Thanks that worked! Not as elegant but I agree it's more appropriate in the
Form class.
For the benefit of others this is what I ended adding to my Form class:
$this-widgetSchema['author_id'] = new sfWidgetFormPropelChoice(array(
'model' = 'Author',
'add_empty' = 'Default
Hey Ca-Phun,
glad to hear all is good. I also thought I lost some elegance in the
process, but only until I started to look at the generator.yml as a
quickdirty helper, and the form as the refinement tool. Now life is
much nicer ;)
Also, just to add some more info to your solution, the