hello …
I create the form in cjuitab, but the code "echo errorSummary" do not print (validation error).
this my code
view.
$this->widget('zii.widgets.jui.CJuiTabs', array(
'tabs'=>array(
'En' =>$this->renderPartial("create", array('model' => $model), $this),
'En1' =>$this->renderPartial("create1", array('model1' => $model1,'id'=>'profile'), $this),
),
'options'=>array(
'collapsible'=>true,
),
));
public function actionCreate()
{
$model=new Barang;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Barang']))
{
$status = 0;
$model->attributes=$_POST['Barang'];
if(CUploadedFile::getInstance($model,'image') != ""){
$model->image=CUploadedFile::getInstance($model,'image');
$status = 1;
}
if($model->save()){
if($status ==1)
$model->image->saveAs(Yii::app()->basePath . '/../images/' . $model->image);
$this->redirect(array('view','id'=>$model->kode_barang,'id2'=>$model->kode_group,'id3'=>$model->kode_sub_group));
}
}
$this->render('create',array(
'model'=>$model,
));
}
need help:(