cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CrashWave
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
v-xida-msft
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
eka24
Super User
Super User

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.

 

 

v-xida-msft
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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,646)