CF8 switch of autocomplete on form

pimh 28 Nov, 2025

Hi Max, 

Is there a method to switch off the auto complete for a complete form? Normally you can put autocomplete="off" in the form tag as additional attribute. Is there a way to insert this. 

Kind regards, Pim 

Max_admin 29 Nov, 2025
Answer

Hi Pim

a global autocomplete="off" on the form tag may or may not be respected by the browser, I think the following code inside a JavaScript view in your form page should auto add it:

document.addEventListener("DOMContentLoaded", function () {
    document.querySelectorAll("form").forEach(f => f.setAttribute("autocomplete", "off"));
    document.querySelectorAll("input, select, textarea").forEach(el => el.setAttribute("autocomplete", "off"));
});
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
pimh 30 Nov, 2025
1 Likes

Hi Max,

Thanks will try later. For now I used individual input attributes. Most important fields should have it switched off for now. 

Kind regards, Pim

Post a Reply