After i used multiple layouts in my app , then Cpatcha not display any image
This my code
Controller :
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
// page action renders "static" pages stored under 'protected/views/site/pages'
// They can be accessed via: index.php?r=site/page&view=FileName
'page'=>array(
'class'=>'CViewAction',
),
);
}
model :
public function rules()
{
return array(
array('email, password', 'required','message'=>'-- {attribute} '),
array('password', 'authenticate'),
// verifyCode needs to be entered correctly
array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements(),'message'=>' {attribute} Error '),
);
}