【发布时间】:2015-08-12 01:31:41
【问题描述】:
我想要做的是获得一个只允许输入数字的表单字段,但是当我尝试这样做时:
<?php
echo $this->Form->input('aht',array(
'label' => 'AHT',
'type' => 'number',
'required' => true
));
?>
cakephp 输出:
<div class="input number">
<label for="aht">AHT</label>
<input id="aht" type="text" required="required" name="data[aht]">
</div>
而不是 HTML 5 输入类型“数字”。 当尝试使用其他类型(如文本)时,它工作正常。 有什么想法吗?
CakePHP 版本是 2.5.4
【问题讨论】:
标签: html cakephp-2.0 forms html-input