Actually, I noticed that the field takes the value stored in database instead of taking my default value (normal behaviour).
So, now my question is : how to force use of these default values ? -- Adrien On 20 avr, 19:42, Adrien Mogenet <adrien.moge...@gmail.com> wrote: > 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'); > ... > > } > > By this way, it doesn't take effect. > But when I put the code in action class : > > public function executeEdit() > { > ... > $this->form->setDefault('updated_by', '42'); > > } > > The default value is set correctly. This is the first time I discover > this behaviour... is it really normal ? > > Is there a way to do what I wanted to write ? > I don't think it matters but anyway : the default value '42' is > actually get from sfUser::getAttribute('user_id', null, 'user'); > method. > > -- > Adrien Mogenet --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---