-
FEATURED COMPONENTS
First time here? Check out the FAQ!
We would like to give the browser a hint not to save passwords. The recommended way is to the use the autocomplete="off" tag on the input html tag.
Is there a way that one could add / append this option to the html code that is generated by the textbox mold?
Regards Eddie
Hi,
You can use client attribute as follows:
<zk xmlns:ca="client/attribute">
<textbox type="password" ca:autocomplete="off" />
</zk>
I found the solution to the problem. Add the following code at top your zul file before the zk tag
<?script content="
zk.afterLoad('zul.inp', function () {
var _xtextbox = {};
zk.override(zul.inp.Textbox.prototype, _xtextbox, {
textAttrs_: function () {
return _xtextbox.textAttrs_.apply(this, arguments)+' autocomplete=\"off\"';
}
});
});"?>
You should do the following:
type="password"
to type="text"
or just erase that attribute.<input>
tag): <script> setTimeout(() => getPasswordInputElement().setAttribute('type', 'password'), 1500) </script>
Delay is required, because without that browser would still insert that saved password. Function getPasswordInputElement()
searches for a DOM element.
Asked: 2013-09-17 18:45:05 +0800
Seen: 108 times
Last updated: Jun 09 '17
AddThis implementing the Toolbox in Java
composite component help [closed]
EL in a forEach @command not working?
Different template for each grid row
Cardlayout animation is broken
Grid RowRender slow using 6.5.1 and sizable=true
setVisible(false), component will load or not
Decimalbox and doublebox value rounded on iPad