cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

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
Super User III
Super User III

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
Super User III
Super User III

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

@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

Super User III
Super User III

@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."

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...😊

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

 

 

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.

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (52,780)