I'm using YiiBooster and trying to make a TextField within TbActiveForm inside the /views/layouts/main.php
For the controller I've added:
<?php
class LayoutsController extends Controller
{
public function actionMain()
{
$model=new Item;
$this->render('main',array('model'=>$model));
}
}
?>
And the views:
<?php
$this->beginWidget(
'booster.widgets.TbActiveForm',
array(
'id' => 'inlineForm',
'type' => 'inline',
'htmlOptions' => array('class' => 'well'),
)
);
echo $form->textFieldGroup($model, 'textField');
$this->endWidget();
?>
But I have small problem, when tried to run it comes the error message:
PHP notice Undefined variable: model
Can anybody help me to fix this? Thanks.