cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kadd
Resolver III
Resolver III

Disable textInput field when using checkbox inside a gallery

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 ! 🙂

 

1 ACCEPTED SOLUTION

Accepted Solutions
DevendraSingh
Resolver I
Resolver I

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

View solution in original post

4 REPLIES 4
DevendraSingh
Resolver I
Resolver I

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

View solution in original post

Hello,

 

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

 

Thanks a lot !!

 

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

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 !! 🙂

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,189)