Hi,
I have a problem with sfWidgetFormChoice :
when i try to filter with a sfWidgetFormChoice, it does not work
in log, sql request does not have clause on the categorie.
any idea ?
here is my code :
totoPeer:
class totoPeer extends BaseTotoPeer
{
static protected $categories = array(
'bleu' => 'Bleu',
'rouge' => 'Rouge',
'vert' => 'Vert',
);
static public function getCategoriesChoices()
{
return self::$categories;
}
}
totoFormFilter
class totoFormFilter extends BaseTotoFormFilter
{
public function configure()
{
$this->widgetSchema['categorie'] = new sfWidgetFormChoice(array(
'choices' => CoursPeer::getCategoriesChoices(),
'multiple' => false,
'expanded' => false,
));
$this->validatorSchema['categorie'] = new sfValidatorChoice(array(
'choices' => array_keys(CoursPeer::getCategoriesChoices()),
'multiple' => false,
));
}
}
generator.yml
filter:
display: [categorie]
Thanks. Jerome
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---