我正在使用以下代码生成验证码:
$captcha = $this->createElement('captcha', 'captcha',
array('required' => true,
'captcha' => array('captcha' => 'Image',
'font' => 'resource/fonts/arial.ttf',
'fontSize' => '24',
'wordLen' => '5',
'height' => '50',
'width' => '150',
'imgDir' => 'resource/captcha',
'imgUrl' => 'resource/captcha',
'gcFreq'=>'10',
'dotNoiseLevel' => '10',
'lineNoiseLevel' => '2')));
$captcha->setLabel('Captcha');
生成以下代码:
<label for="captcha-input" class="login_label required">Captcha</label>
<img width="150" height="50" alt="" src="captcha/eb3a592c8b1c7a71b0c7ce5179422be2.png" />
<input type="hidden" name="captcha[id]" value="eb3a592c8b1c7a71b0c7ce5179422be2" id="captcha-id">
<input type="text" name="captcha[input]" id="captcha-input" value="">
<input type="text" name="captcha" id="captcha" value="eb3a592c8b1c7a71b0c7ce5179422be2">
有人可以指导我如何删除额外的输入文本字段,例如
<input type="text" name="captcha" id="captcha" value="eb3a592c8b1c7a71b0c7ce5179422be2">
提前致谢