Reputation: 81
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',
'depends' => 'Category',
'add_empty' => 'select article'
));
Thanks
Upvotes: 0
Views: 1538
Reputation: 3795
Hum... I'm not sure to understand the question, but I propose:
$this->getValue('category_id');
Upvotes: 1