开发者

[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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜