I was wondering why my capctha is always display the same image until I click on "Get new code" then it will change. Anyone can help? It also happened on the Contact us page generated by yiic.
FYI, I am running it on Windows XP Pro, XAMMPP and Firefox as the browser.
When you refresh the page that contains the captcha (without submitting the form), the image will stay the same. If you submit the actual form, the image will change when testLimit has been reached.
...
public function actions()
{
return array(
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
);
}
...
and I put this code under the view
...
<?php if(extension_loaded('gd')): ?>
<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>
</div>
<?php endif; ?>
...
Had the same trouble with captcha (in v1.1.1 r1907): it doesn’t refresh, even after submitting the form, and it ignores “testLimit”. It only refreshes after clicking on “get new code” button.