window.addEventListener('load', () => {
if (document.querySelector('.app-customer.ctrl-guest.act-index')) {
document.querySelectorAll('form').forEach(form => form.autocomplete = 'off');
}
});
Thanks for your reply @twisted1919 .You can create a file called called app-custom.js in /customer/assets/js folder, and put this content in it:
JavaScript:window.addEventListener('load', () => { if (document.querySelector('.app-customer.ctrl-guest.act-index')) { document.querySelectorAll('form').forEach(form => form.autocomplete = 'off'); } });
No, just create this file with name: app-custom.js in /customer/assets/js and add that code inside.Just one more question, do I need to call this app-custom.js file somewhere else??
Or simply by adding the js code file will do the magic
window.addEventListener('DOMContentLoaded', () => {
if (document.querySelector('.ctrl-guest')) {
document.querySelectorAll('form').forEach(form => form.autocomplete = 'new-password');
document.querySelectorAll('input').forEach(input => input.autocomplete = 'new-password');
}
});