在 Zend Form 元素上显示 IPAD 数字键盘
在 html 元素中,如果我们使用 type="number" 作为输入字段,IPAD 将默认为该字段显示数字键盘。
但在 Zend 中,当我使用 CreateElement('number', 'zipcode'); 时它显示一个错误。使用 IPAD 时是否有其他方法可以在 zend 元素上显示数字键盘。
In html elements if we use type="number" for input field, IPAD will show numeric keypad by default for that field.
But in Zend when I use CreateElement('number', 'zipcode'); It shows an error. Is there any other way to show numeric keypad on zend element when using IPAD.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以编写自定义表单元素,例如扩展
Zend_Form_Element_Text
的My_Form_Element_Number
和自定义视图帮助器,例如My_Viev_Helper_Number
以使用适当的属性显示它。更新:示例(未完全正常工作,只是提供一个想法)
You could write custom form element, e.g.
My_Form_Element_Number
that extendsZend_Form_Element_Text
and custom view helper, e.g.My_Viev_Helper_Number
to display it with proper attributes.UPDATE: example (not fully working, just to give an idea)