Page 1 of 1
Autocomplete in edit forms
Posted: Tue Sep 04, 2018 1:10 pm
by nemo57
Hi,
I cannot set my web browsers (ff, chromium) in order to take advantage of the browser form autocomplete feature.
I mean the text and textarea fields in the forms, not the lookup fields.
Is there any way to achive this?
best regards, rob
Re: Autocomplete in edit forms
Posted: Wed Sep 05, 2018 7:37 am
by toms
Hi Rob,
If I am not mistaken, autocomplete is only available for elements that are part of an HTML form.
But...
the fields of an Edit form do not belong to a HTML form.
Using jQuery's wrap(), we can insert an HTML form around the DIV #nuRECORD that contains all fields of a form.
Place this JavaScript in the Header Tab (under Setup) to activate autocomplete for all forms:
Code: Select all
function nuOnLoad() {
if (nuFormType() == 'edit') {
// This will probably suffice if there is just on nuRECORD in the window
$("#nuRECORD").wrap('<form id="nuFormWrapper"></form>');
/*
// If there is more than one #nuRECORD, use this code (not sure if that can happen):
$("#nuRECORD").each(function(index) {
$(this).wrap('<form id="nuFormWrapper' + index + '"></form>');
});
*/
}
}
If desired, it can also be activated for only one or some specific forms.
Important: Log out and back in again for the change to take effect.
Please let me know if that works for you.