public function actionCreate() { $model = new Sidebar(); $form = new Form('content.SidebarForm', $model); // $this->performAjaxValidation($model); if (isset($_POST['Sidebar'])) { $model->attributes = $_POST['Sidebar']; if ($model->save()) { $this->redirect(['view', 'id' => $model->id]); } } $this->render('create', ['form' => $form]); }