<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'product-form',
// Please note: When you enable ajax validation, make sure the corresponding
// controller action is handling ajax validation correctly.
// There is a call to performAjaxValidation() commented in generated controller code.
// See class documentation of CActiveForm for details on this.
'enableAjaxValidation'=>false,
'htmlOptions'=>array('enctype'=>"multipart/form-data"),// <--- add this
)); ?>