开发者

[Symfony]--Get value from selected Item

开发者 https://www.devze.com 2023-03-03 06:51 出处:网络
how to get a value of selected item from select option In symfony?(from article below) I have that config in my form:

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

精彩评论

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