[Symfony]--Get value from selected Item
how to get a value of selected item from select option In symfony?(from article below)
I have that config in my form:
$this->widgetSchema['category_id'] = new sfWidgetFormDoctrineChoice(array(
'model' => 'Category',
'method' => 'getLibelleCat',
'add_empty' => 'select category'
));
$this->widgetSchema['article_id'] = new sfWidgetFormDoctrineDependentSelect (array(
'model' => 'Article',
'method' => 'getLibelle',
'd开发者_开发技巧epends' => 'Category',
'add_empty' => 'select article'
));
Thanks
Hum... I'm not sure to understand the question, but I propose:
$this->getValue('category_id');
精彩评论