I’ve got a form
<div class="row">
<?php echo $form->labelEx($model,'title'); ?>
<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>128)); ?>
<?php echo $form->error($model,'title'); ?>
</div>
and inside controller createAction function I got
echo "title: ".Yii::app()->request->getParam('title');
nothing gets printed by the output, after title: just empty…
However if I do this
if(isset($_POST['Product']))
{
//$model->attributes=$_POST['Product'];
if($model->save())
title data does gets saved to database. I have a need to access some fields submited by POST method directly and not mass-assign them like above, so why does using:
echo "title: ".Yii::app()->request->getParam('title');
does not print anything? How do I reference specific field submited with post?