jeffery_the_wind
jeffery_the_wind

Reputation: 18178

jqgrid edit form autocomplete="off" by default, how to change to autocomplete="on"

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"

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

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

Thanks!

Upvotes: 2

Views: 1993

Answers (1)

Chad Ferguson
Chad Ferguson

Reputation: 3091

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');
}

Upvotes: 2

Related Questions