0

Put autocomplete="false" in a textbox

asked 2022-12-14 01:23:38 +0800

softteam gravatar image softteam
130 1 8

Hello,

Is there a way to change the autocomplete of a textbox with password type to false?

Thank you!

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-12-15 21:31:27 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

You can use the client/attribute namespace https://www.zkoss.org/wiki/ZUMLReference/ZUML/Namespaces/ClientAttribute

This lets you define arbitrary attributes on the DOM node of the component, such as the autocomplete attribute.

In Java, you can use the component#setClientAttribute method.

Just a word of warning though: While this is objectively the correct syntax and use case for the autocomplete attribute, a lot of web browsers will just ignore this attribute, on the grounds that password autocomplete is a user-defined feature, and not under the purview of the website itself.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2022-12-14 01:23:38 +0800

Seen: 4 times

Last updated: Dec 15 '22

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More