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

Input Text Box force format to..... Football game score....

Hi all, 

 

I'm building a EURO 2020 (2021) prediction contest app, where I want each user to provide exact score for each game. There are 36 games. I can limit input text box to 3 characters..... 

 

X:X example 1:0, but I want users to be forced to use this format avoiding situation where some people will provide score like 1-0 or even 1 0. 

 

Any chance to force format of each input text box to NUMBER ":" NUMBER ? 

 

Please help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

You can on the fill property use either:

If(IsMatch(TextInput2_1.Text, MultipleDigits & ":" & MultipleDigits ),White,Red)
or
If(IsMatch(TextInput2_1.Text, Digit & ":" & Digit ),White,Red)
 
You can also modify it for notification 
------------

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

3 REPLIES 3
Drrickryp
Super User
Super User

Use a Slider control. It will output a number and the user can't screw it up like a textbox.

You can on the fill property use either:

If(IsMatch(TextInput2_1.Text, MultipleDigits & ":" & MultipleDigits ),White,Red)
or
If(IsMatch(TextInput2_1.Text, Digit & ":" & Digit ),White,Red)
 
You can also modify it for notification 
------------

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.
Lebunim
Frequent Visitor

Solution provided by eka24 was pretty decent. I initially used it but then figured that there is still nothing stopping the user to input invalid data type. I ended up splitting the result into two input text boxes. A lot of manual work but I guess provided a solid solution and preventing user to input multiple values or even letters. each input text box is set to Max Length of 1 and Numeric value. Thank You for help!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,103)