带有下拉菜单的 sfWidgetFormInputText
我在 lib/form
中有一个像这样的输入字段:
'zipcode' => new sfWidgetFormInputText(array(), array('size' => '40', 'maxlength' => '100', 'value' => $t,
// 'onblur' => "if(this.value == '') { this.value='$t'}",
'onfocus' => "if (this.value == '$t') {this.value=''}",
'choices' => array('c' => '', 'm' => '12345', 'f' => '98765')
)),
choices
选项不起作用。当我单击邮政编码时,是否有任何选项会出现包含一些邮政编码的下拉列表?
I have an input field like this in lib/form
:
'zipcode' => new sfWidgetFormInputText(array(), array('size' => '40', 'maxlength' => '100', 'value' => $t,
// 'onblur' => "if(this.value == '') { this.value='$t'}",
'onfocus' => "if (this.value == '$t') {this.value=''}",
'choices' => array('c' => '', 'm' => '12345', 'f' => '98765')
)),
choices
option doesn't work. Is there any option when I click into the zipcode that a dropdown list with some zipcodes appear?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有标准的 HTML 字段可以执行您想要的操作。您可以:
select
)There's no standard HTML field to do what you want. You can either:
select
)