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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Enable/Disable Text In...
Power Apps
Unanswered

Enable/Disable Text Input control based on click of a button/Icon

(0) ShareShare
ReportReport
Posted on by 96

Hello All,

 

I am building a part of solution where data is getting directly populated in Text Input Control from other source but if data populated is wrong , user has an option to change it by clicking on edit icon .

 

Prateek9_0-1683018079013.png

 

So the requirement is that initially the text input control should be in  disabled mode (as it already has pre-populated data from another source) and when user clicks on "Edit" Icon , below things should happen :

1. Text Input control should be in Edit Mode.

2. Edit Icon should change to "Check" Icon.

 

Once User has entered the correct data , user clicks on the same "check" icon which then makes the text input field "Disabled" and change the "Check" icon back to "Edit" icon.

 

Can you please help me with the code as i am totally confused with it.

 

Thanks and Regards

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Prateek9 ,

    OnVisible of the Screen

    UpdateContext({varEdit: false})

    OnSelect of the Icon

    UpdateContext({varEdit: !varEdit})

    Icon property of the Icon

    If(
     varEdit, 
     Icon.Check, 
     Icon.Edit
    )

    DisplayMode of the Text Box

    If(
     varEdit, 
     DisplayMode.Edit, 
     DisplayMode.Disabled
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Prateek9 Profile Picture
    96 on at

    @WarrenBelz 

    thanks a lot , it worked like a charm. 🙂

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard