what’s wrong? Please help…
------Model--------
public $verifyCode;
public function rules()
{
return array(array(‘verifyCode’, ‘captcha’, ‘allowEmpty’=>!CCaptcha::checkRequirements()),
);
}
public function attributeLabels()
{
return array(‘verifyCode’=>‘Verification Code’, );
}
--------Controller
public function actions(){
return array(
// captcha action renders the CAPTCHA image displayed on the user registration page
‘captcha’=>array(
‘class’=>‘CCaptchaAction’,
‘backColor’=>0xFFFFFF,
),
);
}
public function accessRules()
{
return array(
array(‘allow’, ‘actions’=>array(‘create’,‘update’,‘captcha’),
‘users’=>array(’@’),),
);
}
-------------------View--------------
<?php $form=$this->beginWidget(‘CActiveForm’, array(
‘id’=>‘project-form’,
‘enableAjaxValidation’=>false,
));
?>
<?php if(CCaptcha::checkRequirements()): ?>
<div class="row">
<?php echo $form->labelEx($model,‘verifyCode’); ?>
<div>
<?php $this->widget(‘CCaptcha’); ?>
<?php echo $form->textField($model,‘verifyCode’); ?>
</div>
<div class="hint">Please enter the letters as they are shown in the image above.
<br/>Letters are not case-sensitive.</div>
<?php echo $form->error($model,‘verifyCode’); ?>
</div>
<?php endif; ?>
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? ‘Create’ : ‘Save’); ?>
</div>
<?php $this->endWidget(); ?>