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 / Disable textInput fiel...
Power Apps
Answered

Disable textInput field when using checkbox inside a gallery

(0) ShareShare
ReportReport
Posted on by 475

Hi all,

 

I'm sure my question is very basic but i admit i'm a bit stuck...

 

I have a gallery, each line has a checkbox and a text field.

I'd like to have the textfield corresponding to the checkbox switching fro; edit to disable mode when i tick the box.

 

I set the OnSelect property of the checkbox like this : UpdateContext({varLocCheck:!varLocCheck})

and the  DisplayMode of my Text field like this : If(varLocCheck,Edit,Disabled)

 

The problem is whenever i check or uncheck 1 of the boxes, all the text fields get disbaled/enabled.

 

Is there a way to disbale/enable only the text field related to the box that is checked ?

 

Thanks a lot for your help ! 🙂

 

Categories:
  • Verified answer
    DevendraSingh Profile Picture
    144 on at

    Hi,

    Following are the steps,

    • Step1: Add a checkbox in the gallery lets say id is "CheckBox"
    • Step2: Add a text box in the gallery let say id is "TextBox", add the formula If(Checkbox.Value, DisplayMode.View, DisplayMode.Edit) on "DisplayMode" property.

    Please click Accept as Solution, if this solution solved your issue. If this post was useful, please consider giving it Thumbs Up.


    Thanks & Regards,

    Devendra Singh

  • Kadd Profile Picture
    475 on at

    Hello,

     

    Thanks for your answer ! aaaah ok...simply like this ..waw ..ha ha ha 

     

    Thanks a lot !!

     

  • DevendraSingh Profile Picture
    144 on at

    Hi,

    It's working fine on my end, can you share some more details.

    Disable textInput field when using checkbox inside a gallery.png

    Please click Accept as Solution, if this solution solved your issue. If this post was useful, please consider giving it Thumbs Up.


    Thanks & Regards,

    Devendra Singh

  • Kadd Profile Picture
    475 on at

    Hi Devendra,

     

    yes it works , sorry...my bad 😛 I left something on the properties that prevented it from working fine.

     

    Thanks again for your help !! 🙂

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard