LWSChad Posted July 26, 2014 Report Share Posted July 26, 2014 Hello, Does anybody know how to disable autocomplete on text input fields? THANKS Quote Link to comment Share on other sites More sharing options...
Jan Posted July 27, 2014 Report Share Posted July 27, 2014 Hello Eiq, As far as I know, you can add the Header&Footer element and enter the following code to the Footer: <script type= "text/javascript"> document.getElementById("caspioform").autocomplete = 'off'; </script> I hope it helps. LWSChad 1 Quote Link to comment Share on other sites More sharing options...
LWSChad Posted July 30, 2014 Author Report Share Posted July 30, 2014 Thanks for the reply,,, the reason I couldn't get it to work is that apparently Google Chrome is ignoring .autocomplete = 'off' That code should work in other browsers. A workaround that works, but affects performance, is to create an empty table to use as an AutoComplete lookup table. Quote Link to comment Share on other sites More sharing options...
MayMusic Posted July 31, 2014 Report Share Posted July 31, 2014 What is the reason of having an autocompelete field and disabling it? Why not just using text field ? Quote Link to comment Share on other sites More sharing options...
LWSChad Posted July 31, 2014 Author Report Share Posted July 31, 2014 I'm not referring to a Caspio Autocomplete that I can control. I'm referring to the Autocomplete function in all web browsers that get their values from previous entries. Quote Link to comment Share on other sites More sharing options...
casGary Posted August 4, 2014 Report Share Posted August 4, 2014 Hello EIQ, This function is supported only by the following versions of browsers: Internet Explorer 9.0+,Chrome 17.0+, Opera 9.6+, Safari 5.2+, Firefox 4.0+, Android 2.3+, iOS 3.0+ Maybe you are using the earlier version of chrome. Quote Link to comment Share on other sites More sharing options...
Alison Posted July 23, 2018 Report Share Posted July 23, 2018 Hello, Also you can try the following code: document.getElementById("caspioform").setAttribute("autocomplete", "off"); Quote Link to comment Share on other sites More sharing options...
DefinitelyNot31337 Posted July 26, 2018 Report Share Posted July 26, 2018 Hello ezIQchad, You may explicitly set autocomplete to 'off' specifically to input fields with type of 'text' with this code. document.querySelectorAll('input[type=text]').forEach( (elem) => {elem.autocomplete = "off"}) Quote Link to comment Share on other sites More sharing options...
Franchiser Posted July 27, 2018 Report Share Posted July 27, 2018 @ezIQchad autocomplete=”off” is not valid markup with XHTML Transitional, which is a common DOCTYPE. I always have this code in web programming and it is working until now, you may try this and it might help. if (document.getElementsByTagName) { var inputElements = document.getElementsByTagName(“input”); for (i=0; inputElements; i++) { if (inputElements.className && (inputElements.className.indexOf(“disableAutoComplete”) != -1)) { inputElements.setAttribute(“autocomplete”,”off”); } } } Quote Link to comment Share on other sites More sharing options...
Bloom Posted December 1, 2020 Report Share Posted December 1, 2020 /* Turn autocomplete off on form*/ document.getElementById("caspioform").setAttribute("autocomplete", "off"); /* Turn autocomplete off on each input text element*/ if (document.getElementsByTagName("input").length > 0) { var inputElements = document.getElementsByTagName("input"); for (i=0; i < inputElements.length ; i++) { if (inputElements[i].getAttribute("type") == "text") { var att = document.createAttribute("autocomplete"); att.value = "off"; inputElements[i].setAttributeNode(att); } } } Vitalikssssss 1 Quote Link to comment Share on other sites More sharing options...
RailRecipe Posted December 28, 2020 Report Share Posted December 28, 2020 Hii there, you can disable autocomplete from the Browser setting as well. Quote Link to comment Share on other sites More sharing options...
telly Posted December 29, 2020 Report Share Posted December 29, 2020 Hi, just to add if you want to disable autocomplete only on your end you may check this helpful article on how to configure the settings on different browsers: https://support.iclasspro.com/hc/en-us/articles/218569268-How-Do-I-Disable-or-Clear-AutoFill-AutoComplete-Information- Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.