When you instanciate your form, give it some options. Your action :
public function executeEdit($request)
{
$options = array
(
'default_email' => "Entrez votre e-mail"
);
$form = new ExemploForm($object, $options);
}
And your forms is now :
class myExemploForm extends ExemploForm
{
public function configure()
{
parent::configure();
$defaultEmail = $this->getOption('default_email', 'Enter your e-mail
here');
$this->setDefault('email', $defaultEmail);
}
}
2009/11/25 Augusto Flavio <[email protected]>
> Ok. I did it works fine and ok. but how can i do it in the actions?
>
>
>
> thanks
>
>
>
> Augusto Morais
>
> --
>
> 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]<symfony-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
--
Alexandre Salomé -- [email protected]
--
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.