cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Default text input as text when format is number

I have a slide with a text input, drop down and button. text input is for a year input.
What I would like is to have a default text as "Year" in the textinput and that text clear on select and only allow user to enter number. 
So when the button is selected if anything besides numbers is there it errors.
Is that possible to have "Year" in text input with format number and clear it on select?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @CrashWave ,

Based on the needs that you mentioned, I think the HintText 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:

2.JPG

Set the  HintText property of the Text Input Box to following:

"Year"

If you want to force user entering  number value within the Text Input, I think the Format property of the Text Input Box could achieve your needs, please set the Format property of this Text Input Box to following:

TextFormat.Number

Please check the following GIF screenshot for more details:

Test.gif

 

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.

View solution in original post

2 REPLIES 2
Super User III
Super User III

The work around would be to insert a Label besides the Textbox that contains the Number (Year).

That Label will rather hold the "Year" text.

Or

In the HintText Property of the TextBox type "Year"

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

 

 

Community Support
Community Support

Hi @CrashWave ,

Based on the needs that you mentioned, I think the HintText 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:

2.JPG

Set the  HintText property of the Text Input Box to following:

"Year"

If you want to force user entering  number value within the Text Input, I think the Format property of the Text Input Box could achieve your needs, please set the Format property of this Text Input Box to following:

TextFormat.Number

Please check the following GIF screenshot for more details:

Test.gif

 

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.

View solution in original post

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 (24,074)