public function actionCreateOrderItemChild($id) { $model = new OrderItemSn(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['OrderItemSn'])) { $model->attributes = $_POST['OrderItemSn']; if ($model->save()) { $this->redirect(array('view', 'id' => $model->id)); } } $model->order_item_id = $id; $this->render('create', array('model' => $model)); }