cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sanranaji
Level: Powered On

Make a field or label visible if my cursor is in one of the text field

Hi Experts,

I am building a PowerApps application and a intake form in it. The fields in our form need very detailed instructions about what users needs to fill in those fields.

I am aware of the hint text & tool tip functionality but that won't suffice our need. What we need is that as soon as a user put the cursor in a text field in our intake form then another label or text box becomes visible which will have the detailed instructions about what needs to be fill in that filled.

I tried using If condition on the Visible property of the help label but it doesn't work. Anyone knows how we can make a label visible if my cursor is in one of the text field?

Formula:

If Intake.Text1.Focused = true then Help.label.visible = true

1 ACCEPTED SOLUTION

Accepted Solutions
TomasZubov
Level 8

Re: Make a field or label visible if my cursor is in one of the text field

Hi,

First part is easy you just need to set OnChange to:

 

 

UpdateContext({Field2Visibile:false})

 

image.png

 but the problem is, what if user just clicks into the field and does not change anything. For such case only thing that comes in my mind, is to add small cancel icon into each dialogue with onSelect setting this variable to flase, so in case it is displayed by accident, there is a way to close it.

View solution in original post

11 REPLIES 11
TomasZubov
Level 8

Re: Make a field or label visible if my cursor is in one of the text field

Hello,

 

 On first field (element) set onSelect action to:

 

 

UpdateContext({Field2Visibile:true})

 

Field2visible - is variable and can be named any way you want

 

then set this variable in visible property of second field(element)

 

image.png

PowerAddict
Level 10

Re: Make a field or label visible if my cursor is in one of the text field

Do you weantthis on just hover or is it ok to display when the user clicks on the text box?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Super User
Super User

Re: Make a field or label visible if my cursor is in one of the text field

Hi @Sanranaji 

Unfortunately, there is not an 'OnHover' property that we can use in PowerApps.

The hint text & tool tip properties that you've seen already are the closest thing that you'll find. There's a post about this in the ideas forum that you can vote on.

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Hover-amp-Unhover-which-can-update-other-contro... 

Part of this issue is that PowerApps equally supports tablet and mobile devices, where the concept of a mouse and cursor doesn't exist. This is one of the reasons why this idea hasn't been actively developed.

 

Sanranaji
Level: Powered On

Re: Make a field or label visible if my cursor is in one of the text field

Thank you Tomas. This solves half of the problem. So the Help Label comes up when we put the cursor in the text box. But when we move the cursor out of the text box, the help label still remains there.

I need something like "OffSelect" to reset the variable value to false. Are you aware of anything which can help me to accomplish this?

Sanranaji
Level: Powered On

Re: Make a field or label visible if my cursor is in one of the text field

Hi @PowerAddict , I don't want this on Hover. I want the label to show up when the user clicks in the text box.

Sanranaji
Level: Powered On

Re: Make a field or label visible if my cursor is in one of the text field

Thank you @timl , The thread talks about the hover property for media & icons but my problem is different.

Tomas's solution is pretty close to what I need. I am just wondering if we can find something like offselect to reset the variable to false once the cursor moves out of the text box.

PowerAddict
Level 10

Re: Make a field or label visible if my cursor is in one of the text field

So on your text box's OnSelect property, set a variable to true (global or contextual). Then use that variable as the Visible property of your label.

Let me know if that doesn't work.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
TomasZubov
Level 8

Re: Make a field or label visible if my cursor is in one of the text field

Hi,

First part is easy you just need to set OnChange to:

 

 

UpdateContext({Field2Visibile:false})

 

image.png

 but the problem is, what if user just clicks into the field and does not change anything. For such case only thing that comes in my mind, is to add small cancel icon into each dialogue with onSelect setting this variable to flase, so in case it is displayed by accident, there is a way to close it.

View solution in original post

Community Support Team
Community Support Team

Re: Make a field or label visible if my cursor is in one of the text field

Hi @Sanranaji ,

Do you want to display a Label when the cursor is in a Text Input box?

Do you want to set the variable back to false when the cursor moves out of the Text box?

 

If you want to set the variable back to false when the cursor moves out the Text box, I think the OnChange property of the Text Input box could achieve your needs.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the Text Input box to following:

UpdateContext({ShowLabel: true})

Set the OnChange property of the Tetx Input box to following:

UpdateContext({ShowLabel: false})

 

Set the Visible property of the Label to following:

ShowLabel

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,449)