To make the capctha you have to do :
Add the code rules to your controller id. For example UserController.
public function actions(){
return array(
// captcha action renders the CAPTCHA image displayed on the user registration page
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
);
}
The view form should like this
$form=$this->beginWidget(‘CActiveForm’,array(
‘id’=>‘user-form’,
‘enableAjaxValidation’=>false,
));
?>
Don’t forget to put the access rules like this :
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','captcha'),
'users'=>array('@'),
),
Add field in your model for example User.php
public $verifyCode;
Add this code to your view form
<?php if(extension_loaded(‘gd’)): ?>
<div class="row">
<?php echo $form->labelEx($model,‘verifyCode’); ?>
<div>
<?php $this->widget(‘CCaptcha’); ?>
<?php echo $form->error($model,‘verifyCode’); ?>
<?php echo $form->textField($model,‘verifyCode’); ?>
</div>
</div>
<?php endif ?>
The last add the rules here in the rules() model
array(‘verifyCode’, ‘captcha’, ‘allowEmpty’=>!CCaptcha::checkRequirements()),
i think this will help beginers…i tried,i got