I'm have difficulty setting a variable in my model from an activeTestField in Yii. Here is my view:
echo CHtml::activeTextField($model, 'text_field', array('id'=>'test'));
echo CHtml::submitButton('Query');
My model:
class QueryForm extends CFormModel
{
public $text_field;
}
My controller:
public function actionQuery()
{
$model=new QueryForm;
echo $model->text_field;
}
I've been searching for answers on google but I've had difficulty finidng answers to complete beginner questions such as this. Thank you!