Oké réglé.
$this->setValidators(array(<nom du sfWidgetFormSchema> => new
sfValidatorSchema($aValidator1),
<nom du sfWidgetFormSchema> =>
new sfValidatorSchema($aValidator2),
<nom du sfWidgetFormSchema>
=> new sfValidatorSchema($aValidator3),
<nom du sfWidgetFormSchema>
=> new sfValidatorSchema($aValidator4))
);
On 17 nov, 19:24, DoRiaN <[email protected]> wrote:
> Bonjour,
>
> Pour construire un formulaire voici comment je m'y prends pour le
> formater comme je souhaite :
> ***************************************************************************
> ****************
> /**
> * $aWidgetSchema
> * Contient un sfWidgetFormSchema instancié avec un tableau de
> sfWidgetFormSchemaDecorator(sfWidgetFormSchema($aWidget))
> */
>
> $this->setWidgetSchema($aWidgetSchema);
> ***************************************************************************
> ****************
>
> Afin d'obtenir une sorte de fieldset, tout ça fonctionne.
> ***************************************************************************
> ****************
> Titre
>
> > Bloc
> >> Champ1
> >> Champ2
>
> Titre
>
> > Bloc
> >> Champ1
> >> Champ2
>
> Titre> Bloc
> >> Champ1
> >> Champ2
>
> ***************************************************************************
> ****************
>
> Pour les labels je fais (ça fonctionne) :
> ***************************************************************************
> ****************
> $this->widgetSchema[<nom du sfWidgetFormSchema>]->setLabels($aLabel);
> ***************************************************************************
> ****************
>
> En revanche, je ne sais plus comment renseigner mes validateurs ?
> ***************************************************************************
> ****************
> $this->setValidators($aValidator);
> ***************************************************************************
> ****************
> Ne fonctionne plus.
>
> J'ai essayé de décomposer mon traitement réparti dans plusieurs
> classes ici, j'espère qu'il y a toutes les informations.
>
> Merci,
> Dorian
--
Vous recevez ce message, car vous êtes abonné au groupe Google
Groupes Symfony-fr.
Pour envoyer un message à ce groupe, adressez un e-mail
à [email protected].
Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse
[email protected].
Pour plus d'options, consultez la page de ce groupe :
http://groups.google.com/group/symfony-fr?hl=fr