cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nejhade
Helper I
Helper I

Password visible on click of a button and disappears on same button click

Hello Fav People,

I have trouble making this functionality.

I want to make my password visible when user click on button and then when he again click on same button password should be again in dots form. 

If password is in dots user click on btn it should show password and vice versa.

eye is button. I have used 'Pressed' but it show password if I click button hold the press.

I want to create once clicked show then again click hide.

Please help..Thanks in advance

nejhade_0-1656407781259.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Aapok
Resolver II
Resolver II

There's no need to use multiple icons.

 

The following formula on your Icon's OnSelect should be what you're looking for.

 

If(varShowPass = TextMode.Password, UpdateContext({varShowPass: TextMode.SingleLine}), UpdateContext({varShowPass: TextMode.Password}))

 

Then, assign varShowPass as the Mode property of your text input.

View solution in original post

2 REPLIES 2
jcfDaniel
Impactful Individual
Impactful Individual

Hi,

 

You can use a couple of icons, on top of each other and pplay with their visible property.

 

Icon1; OnSelect: Set(varShowPass, true); Visible: !varShowPass

Icon2: OnSelect: Set(varShowPAss, false); Visible: !Icon1.Visible

Aapok
Resolver II
Resolver II

There's no need to use multiple icons.

 

The following formula on your Icon's OnSelect should be what you're looking for.

 

If(varShowPass = TextMode.Password, UpdateContext({varShowPass: TextMode.SingleLine}), UpdateContext({varShowPass: TextMode.Password}))

 

Then, assign varShowPass as the Mode property of your text input.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,473)