cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Placeholder for form fields input

Hello,

I've been searching the documentation, and the web but can't find an answer for a very basic question:

How to add a placeholder in the fields of a form in PowerApps?

eg: $1.000,00 

So the user knows she must type a number and this is a USD value field.

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Placeholder for form fields input

Select the Textbox and go for the HintText property and put what you want there:

HintText.JPG

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

7 REPLIES 7
Highlighted
Community Champion
Community Champion

Re: Placeholder for form fields input

Select the Textbox and go for the HintText property and put what you want there:

HintText.JPG

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Highlighted
Helper V
Helper V

Re: Placeholder for form fields input

@eka24 thank you so much, that was easy 🙂

Just one more thing, if I may: how to format the number of the field to 1.000,00?

That is, dots for thousands separators and commas for decimals.

Cheers

Highlighted
Super User
Super User

Re: Placeholder for form fields input

@WebPortal

Looks like I posted once @eka24 already had a good solution.  I must have missed it... so I am removing my post 😉

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Solution Sage
Solution Sage

Re: Placeholder for form fields input

Additionally, you can limit the input to only numbers using the Format property of the TextInput. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-text-input

 

I realize this will preclude users from entering a $, or ',' but it can be helpful for ensuring that only numbers are being entered/used. A useful approach for this is to have one control for input (TextInput as a number), and another for showing the value with a particular format (such as currency). There are a few examples of ways to format your number as currency here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text#number

Highlighted
Helper V
Helper V

Re: Placeholder for form fields input

Ok, but how/where to enter the "Text" function.

In Excel, this would be "Format Cells..." in the context menu...😊

Anotação 2020-04-18 130743.png

 

 

Highlighted
Solution Sage
Solution Sage

Re: Placeholder for form fields input

See the sample app attached. Go to https://us.create.powerapps.com/studio/# and then Open, and select the file (after you download it).

 

Basically, I've placed a Label over a TextInput. Using a variable, they will toggle the visibility of one of the control's, while the other's visibility is the inverse. Meaning - they won't ever be visible at the same time.

 

OnChange function for TextInput

UpdateContext({locShowLabel:true})

Visible Properties:

  • Label: locShowLabel
  • TextInput: !Label.Visible

 

Then the Text property of the Label is the Text function we described, while the TextInput is a number input mechanism only.

Text(Value(TextInput1.Text), "[$-en-US]$#,### USD")

 

Hope this helps! You'll obviously need to adjust to your needs. FYI: you can copy controls from Studio session to Studio session, if you want to copy these over as starting points.

Highlighted
Helper V
Helper V

Re: Placeholder for form fields input

Interesting solution, thanks for sharing!

 

PS:
In JavaScript / JQuery this a lot easier to do, I'd say a low-code platform should not be so complicated.

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,623)