jqgrid 编辑表单自动完成=“关闭"默认情况下,如何更改为 autocomplete="on" [英] jqgrid edit form autocomplete="off" by default, how to change to autocomplete="on"

查看:45
本文介绍了jqgrid 编辑表单自动完成=“关闭"默认情况下,如何更改为 autocomplete="on"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我的 jqgrid 编辑表单没有 Google Chrome 和 Firefox 常见的良好自动填充功能.我发现 jqGrid 编辑表单正在使用每个具有此属性的 呈现:

Recently my edit forms for jqgrid have not been having the nice autofill functionality that is common to Google Chrome and Firefox. I found that the jqGrid edit forms are being rendered with each <input> having this property:

autocomplete="off"

在 JqGrid 中,我必须在网格定义中做什么才能删除此属性或将其设置为 autocomplete="on"?

In JqGrid what do I have to do in my grid definition to remove this property or set it to autocomplete="on"?

我在 ColModel 定义中没有看到任何相关内容编辑表单选项.这里的任何帮助都会非常棒!

I do not see anything about it in the ColModel definition or the edit form options. Any help here would be really great!

谢谢!

推荐答案

我不相信 edit API 以在编辑表单中的字段上启用自动填充.尽管您可以在 afterShowForm 事件中使用 jQuery 来完成它,并在您希望的任何字段上设置自动完成属性.每个字段的 ID 与列模型中的名称相同.

I do not believe that there is anything in the edit API to enable autofill on a field in the edit form. Though you could do it using jQuery in the event afterShowForm and set the autocomplete property on any of the fields that you wish. The ID's of each field is the same as the name in your column model.

afterShowForm : function (formid) {
    $('#name').attr('autocomplete', 'on');
}

这篇关于jqgrid 编辑表单自动完成=“关闭"默认情况下,如何更改为 autocomplete="on"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆