Input Field Condition Checks If a Number is Within a Minimum - Maximum Range

David shared this question 3 years ago
Answered

I'm looking to create a condition for an input field on my app prototype that when the user enters a number (measurement) that falls outside of a minimum - maximum number range, a warning message appears and the input box turns red. The number enter should remain and the user moves on to the next step. Thanks.

Comments (3)

photo
1

Hello David,


To accomplish this, you may start by adding an condition that validates the range using comparators (less than, greater than, etc.). Using the expression builder, the following steps will allow this:


1. Drag the text input to the expression followed by the proper comparator function and subsequent minimum value.


2. Place an 'and' function after the expression yielded and repeat step one to check the maximum value provided in the second field.


To have the number remain, you may find the 'set value' action of use.


Sincerely,


Luisa

photo
1

Do you have to add an event to the textbox (if so which one), before adding a condition?

photo
1

Nevermind, had to do a show/hide of a message in order to do the comparator.

photo