Symfony 1.2 As I said in my first message, YES, it works when I put `setDefault` in the action. But when you call this method from the form class, it seems to not FORCE the value but just set it as a default value (ie: if no other value has been set)
In my case, it would be very convenient to force this value in the action instead of setting it in the form class, that's why I'm looking for a "tip" to do that directly from the form class :-) -- Adrien On 21 avr, 08:11, Lawrence Krubner <[email protected]> wrote: > Which version of Symfony? > > You should always be able to force a default value from the action. > Always. I've done this many times. > > On Apr 20, 5:42 pm, Adrien Mogenet <[email protected]> wrote: > > > As I tought it changed nothing... :-/ > > > -- > > Adrien > > > On 20 avr, 23:28, "FlyLM [ML]" <[email protected]> wrote: > > > > 2009/4/20 Adrien Mogenet <[email protected]> > > > > > Hi all, > > > > > there is something - strange ? - that I don't understand. > > > > Let say I have a field "updated_by" within the class "user". > > > > > In the class form : > > > > > public function configure() > > > > { > > > > .. > > > > $this->setDefault('updated_by', '42'); > > > > ... > > > > } > > > > Try this : > > > > $this->widgetSchema->setDefault('updated_by', '42'); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
