I've been asked to create a form item which is similar to a PasswordItem but which can toggle between displaying the obscured value and displaying the real value. The default is the text is hidden but, if the user is editing the item, they can toggle to see what the value is and edit it as plain text. The usage is not for a password but for a key field which will be long so it will be easy to make a mistake when typing it.
I think creating a FormItemIcon is a neat way to provide the toggle switch but I haven't found a way to code the click event to show/obscure the value. Any hints would be appreciated.
In case it's not clear what I'm after, browsers have similar behaviour for showing stored passwords - the password is initially obscured but clicking an icon next to them reveals them.
Thank you.
I think creating a FormItemIcon is a neat way to provide the toggle switch but I haven't found a way to code the click event to show/obscure the value. Any hints would be appreciated.
In case it's not clear what I'm after, browsers have similar behaviour for showing stored passwords - the password is initially obscured but clicking an icon next to them reveals them.
Thank you.
Comment