How to view password field

How to view password field

impex09impex09 Posts: 28Questions: 14Answers: 0

Hi, I have a table to manage some users. so.. my table have a password field (type=password), so I would like have the option to view my password (eye icon) to show password.

Do you know how to do it?

thank you

Answers

  • sandysandy Posts: 271Questions: 0Answers: 80

    Hi impex09,

    This can indeed be done, I've made an example for you.

    What I am doing is adding a button to the relevant editor field. When this button is clicked the field type of the password field is checked. You can access the input using the api method field().input(). If it is found to be of type password then it sets the field type to text. Any other type should set the type to be password.

    Hope this helps,

    Sandy

Sign In or Register to comment.