I suggest you have a quick read through the form book (1.2 is still pretty much valid for sf1.4) because all this is pretty much covered there.
To set a default value for a date widget to today, you could do something like this in your form configure() method: $this->setDefault("my_date_widget", "now"); Date widgets take a value that is compatable with strtotime() so there is no need to generate an actual date, although you could if you wanted to... Russ. On Mar 16, 3:29 pm, Paul Bernard <paul.bern...@synfia.com> wrote: > Hello, > > I've been developping a new application with Symfony 1.4 for a few > weeks and I'm trying to improve it. > > How can I set dynamic default values for a field in a form ? > > For instance, how can I set the default value for a date to today ? > > And how can I create a form with > > Thanks for your answers, > > Paul -- 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