cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

Re: Default text input as text when format is number

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

Re: Default text input as text when format is number

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.

 

 

Highlighted
Community Support
Community Support

Re: Default text input as text when format is number

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
secondImage

New Return to Workplace

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

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,798)