Disable autocomplete on forms
Hello,
in addition of the first response,
the option to create a "JavaScript Expression" containning:
document.getElementsByClassName("myForm")[0].setAttribute("autoComplete", "off");
looks to work for the latest web browser.
If you are able to test it.
Julien.
Comments
Thanks for your answers.
Where to call this command, because it seems to work in the browser's console, but not in an asset ?
I tried your workaround without success.
Tried in a text widget or in an input widget, inside my form but still the issue.
I've got an error : Error evaluating < disableAutoComplete > data: Cannot read property 'setAttribute' of undefined
It seems the object isn't known when evaluating the variable.
When you click on the DOM object then execute the expression in console, it works... but not when calling into a variable.
Hello,
unfortunately "autocomplete="off" is not supported by all web browser.
It looks more secured to randomize the input name attribute. This would prevents auto-completion for all browsers.
- You could have a look at this jquery plugin:
https://github.com/terrylinooo/jquery.disableAutoFill
or
- you can try to reproduce the same behavior using a UID javascript expression.
Hope that helps,
Julien.
Comments
Hi Fabien, Are you talking about the autocompletion of your browser? Which types of widgets are you using?
Indeed Bonita UI Designer widgets used in forms do not handle autocompletion, except for one specific widget called "autocomplete"
Thanks for your precision
Hi,
Thanks for your answer.
I talked about the autocompletion of browsers within the input widgets (except the autocomplete widget of course).
We'd like to have the
<input autocomplete="off"></input>
or<form autocomplete="off"><form>
in forms.We've tried to implement a jquey function to dynamically put this attribute on inputs but whithout success in living application.
Thanks a lot.