web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button to change text ...
Power Apps
Answered

Button to change text input mode from password to single line

(0) ShareShare
ReportReport
Posted on by 19

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

Categories:
  • Verified answer
    KickingApps Profile Picture
    628 on at

    @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)

  • dsghi Profile Picture
    19 on at

    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)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard