cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Button to change text input mode from password to single line

I have a value that is semi-sensitive, so we don't want it displayed by default. So I have set the text input mode to password. However, we may need to know what the value is, or change it.  Is there a way to change the field mode to single line via a button press? I can't seem to figure out how... I've been experimenting around TextInput1.Mode = SingleLine

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Skilled Sharer
Skilled Sharer

Re: Button to change text input mode from password to single line

@dsghi

Set your button to a variable:

UpdateContext(

     varInputMode, !varInputMode)

})

Set the Mode of the Text Input box to the following:

If(
varinputMode = true,
TextMode.Password,
TextMode.SingleLine)

View solution in original post

2 REPLIES 2
Highlighted
Skilled Sharer
Skilled Sharer

Re: Button to change text input mode from password to single line

@dsghi

Set your button to a variable:

UpdateContext(

     varInputMode, !varInputMode)

})

Set the Mode of the Text Input box to the following:

If(
varinputMode = true,
TextMode.Password,
TextMode.SingleLine)

View solution in original post

Highlighted
Frequent Visitor

Re: Button to change text input mode from password to single line

Thank you! Minor syntax adjustments, but you got me there. I was clearly over thinking it. 🙂

 

In button OnSelect 

UpdateContext({varInputMode:!varInputMode})

 

Text Input Mode

If(varInputMode=true,TextMode.SingleLine,TextMode.Password)

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,442)