【发布时间】:2014-03-12 10:52:42
【问题描述】:
我有一个yii 应用程序,我使用主题来管理不同的样式和布局。在默认生成的contact.php中,我使用以下代码为表单生成验证码:
//webroot/themes/botany/views/site/contact.php
<?php //echo $form->labelEx($model,'verifyCode'); ?>
<div>
<?php $this->widget('CCaptcha', array('showRefreshButton' => true,
'buttonLabel' => 'Refresh',
'buttonOptions' => '',
'buttonType' => 'button',
'clickableImage' => true));
?>
<?php echo $form->textField($model,'verifyCode', array('class' => 'form-control', 'placeholder' => 'Captcha*')); ?>
</div>
<p>Please enter the letters as they are shown in the image above.
<br/>Letters are not case-sensitive.</p>
<?php echo $form->error($model,'verifyCode'); ?>
<?php endif; ?>
虽然我设置了showRefreshButton => true,但我看不到刷新按钮。以下屏幕截图演示了没有刷新按钮:
【问题讨论】: