I’m trying to create a password visibility toggle button, i.e. the password typed is shown when the ‘eye/closeeye’ button icon is clicked and hides when the ‘closeeye’ icon is clicked.
So there are two events:
- When the eye/close eye button is clicked, it toggles between an ‘open eye’ icon and the ‘close eye’ icon.
- If ‘open eye’ icon = true, show password else don’t show password.
This is a sample pseudocode:
When button is clicked,
if background image ‘eye open’ = true,
show password
else
hide password
Thanks in advance!