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!
Solved! Go to Solution.
Select the Textbox and go for the HintText property and put what you want there:
------------
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.
Select the Textbox and go for the HintText property and put what you want there:
------------
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.
@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
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."
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
Ok, but how/where to enter the "Text" function.
In Excel, this would be "Format Cells..." in the context menu...😊
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:
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.
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.
User | Count |
---|---|
203 | |
92 | |
83 | |
47 | |
42 |
User | Count |
---|---|
252 | |
105 | |
103 | |
62 | |
57 |