php - Retrieving data submitted with Yii's CActiveForm -


i trying retrieve data form created using widget cactiveform. however, when click on submit button, no data written targeted url. how obtain submitted form data?

<p>please list ages of members of household:</p>  <div class="form offset3">     <?php     $form = $this->beginwidget('cactiveform', array(         'id' => 'survey',         'enableclientvalidation' => true,         'enableajaxvalidation' => true,         'action'=>yii::app()->createurl('//survey_resp'),         'clientoptions' => array(         'validateonsubmit' => true,         ),         'htmloptions' => array(         'class' => 'form-horizontal',         ), )); ?>      <div class="row">         <?php echo $form->labelex($model, 'age_1'); ?>         <?php echo $form->textfield($model, 'age_1'); ?>         <?php echo $form->error($model, 'age_1'); ?>     </div>      <div class="row">         <?php echo $form->labelex($model, 'age_2'); ?>         <?php echo $form->textfield($model, 'age_2'); ?>         <?php echo $form->error($model, 'age_2'); ?>     </div>      <div class="row rememberme">         <?php echo $form->checkbox($model, 'resp_re'); ?>         <?php echo $form->label($model, 'resp_re'); ?>         <?php echo $form->error($model, 'resp_re'); ?>     </div>      <div class="row buttons">         <?php echo chtml::submitbutton('submit'); ?>     </div>      <?php $this->endwidget(); ?> 

does "survey_resp" controller or action ? if it's action, should put proper url form's action. example:

 'action'=>yii::app()->createurl('/you_controller_name/your_action_name'), 

ps: remember, if put "//" in createurl, generate url basepath or module. see http://www.yiiframework.com/doc/api/1.1/ccontroller#createurl-detail , http://www.yiiframework.com/doc/api/1.1/cactiveform#action-detail


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -