How to make textbox text disappear when I click on it

I created a Login form, there is a default text ("Edit Value") in the Input Field, and I want that this text ("User name") will disappear when the user is clicking on the textbox. There is no "click" event for Actions
any suggestion?
WhatsApp Image 2020-06-26 at 11.20.04

@vidu-8dab, you can't change the placeholder text for the input, but you can get tricky using the visibility rules, and multiple blocks.

  1. Create a content block and insert a data cell, name it "showPlaceholder", and mark it as a variable.
  2. Set default value of the showPlaceholder variable to =TRUE
  3. Create a button, change the text to "User Name", give it a white background and grey text.
  4. Set the visibility of the button to =$[showPlaceholder]
  5. Set the visibility of the actual "edit value" input block to =not($[showPlaceholder])
  6. Add an automation to the placeholder button, and tell it to update the $[showPlaceholder] variable to =false.

If all that works, when you click the button, the button disappears and the input should now be visible.

The only object with a click event is a button. So you can make a button called "User Name", and give it a white background, and grey text. When the user clicks the button, start an automation that change

2 Likes

Hello @vidu-8dab, welcome to the community! We just recently released an article that speaks to visibility, similar to what @AndrewB had described above. Thought it might be semi-relevant to what you had described, so I figured I'd share: How to Add Conditional Visibility & Data Validation

Hope this helps!

Hello, I read the article and it helped me in designing my buttons however what if I want to change the format or color of a content box with respect to its datacell value? might be a variable or calculated when the list is being populated

Hi @Meezcal, great question! I'd recommend taking a look at the design of the Team Task Tracker template as I believe this does just what you are asking.

Basically, on a screen you'll have a content box for each required color/format. For each content box, you define visibility settings. The expression used in the visibility settings should produce a TRUE or FALSE, depending on whether the data matches, and the result of that should drive which particular color/format content box will be displayed. Take a look...

1 Like

Thanks, that worked like a charm. Same idea but I missed it :wink:

1 Like

Awesome. Glad to hear it worked.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.