public function actionContact()
{
$baseUrl = Yii::app()->theme->baseUrl;
Yii::app()->getClientScript()->registerScriptFile("{$baseUrl}/js/winetkr.js", CClientScript::POS_HEAD);
$model=new ContactForm;
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if(isset($_POST['ContactForm']))
{
$model->attributes=$_POST['ContactForm'];
if($model->validate())
{
$headers="From: {$model->email}\r\nReply-To: {$model->email}";
mail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);
Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');
$this->refresh();
}
}
$model->attributeLabels(Yii::t('strings','name'));
$this->render('contact',array('model'=>$model));
}
it doesn’t work…i thanks a don’t know how to use attributeLabels, have you an exemple ?