Get the posted data from Form in Zend Framework 2

后端 未结 2 874
生来不讨喜
生来不讨喜 2021-01-18 06:40

Im new to Zend Framework, so asking a basic question. I want to get the posted data, in general from one field in a form, I wanted to get the data for debugging purposes.

2条回答
  •  渐次进展
    2021-01-18 07:23

    you can do it in the following way: in your controller action

    $value = $form->getValue('UserName');
    

    in this way you can get the value of zend textbox having ID 'UserName'

    For more details you can study the code given on : Zend Framework Tutorial

提交回复
热议问题