How to view password field

How to view password field

impex09impex09 Posts: 45Questions: 20Answers: 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: 913Questions: 0Answers: 236

    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

  • impex09impex09 Posts: 45Questions: 20Answers: 0

    sorry for the delay, i will check it.

    thank you

Sign In or Register to comment.