Yii Framework Forum: How To Refresh Captcha On Page Reload - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Refresh Captcha On Page Reload help Rate Topic: -----

#1 User is offline   sasori 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 297
  • Joined: 05-November 10

  Posted 01 January 2013 - 07:27 PM

hi, how to show a different code in the captcha box every time a user refreshes or reloads the browser ?

					      	<div id="captchaBox" style="border-bottom: 1px solid #E2E2E2; padding-bottom:10px;">
			            		<?php $this->widget('CCaptcha', array('clickableImage' => true)); ?>
			       			 </div>    

0

#2 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,047
  • Joined: 16-February 11
  • Location:Japan

Posted 01 January 2013 - 08:30 PM

I think you can configure CCaptchaAction::testLimit to 1 to achieve that.

public function actions()
{
	return array(
		// captcha action renders the CAPTCHA image displayed on the contact page
		'captcha'=>array(
			'testLimit' => 1,
		),
		...
	);
}

http://www.yiiframew...estLimit-detail
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users