2011-05-05 45 views
0

如何從選擇選項symfony中獲得所選項目的值(從下面的文章)獲取價值[Symfony的 - 從選定項目

我有一個配置在我的表格:

$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' 

)); 

感謝

回答

1

嗚嗚......我不知道理解的問題,但我建議:

$this->getValue('category_id'); 
+0

不,不是這樣的。 我正在尋找從第二個列表中選擇選項widgetSchema ['article_id']之後顯示錶--article--的細節... 我該怎麼做? – LJme 2011-05-05 16:04:51