Forum Academy Marketplace Showcase Pricing Features

1,39 Apple and 0.21 Banana? Integer Input with no decimal place

This might be a very stupid question, but I spend hours and still don’t have a solution.
I have a list where clients can order different products.

[ ] = Input

Example:

Apple [ 2 ]
Banana [ 5 ]
Strawberry [ 10 ]


Sum: 17

(ORDER) <- button

First I tried to work with Text (numbers only).

PRO

  • only numbers and nothing else
  • limit number to 99 units (no chance to type more than 99)

CON

  • no calculation with input value

After that I tried integer, but now the client could type 1,39 Apple which makes no sense at all!
When I set the limit to 100 the user can still type 99999. The only thing that happens is that the input is invalid.
I want the user to type only in the number range between 0 and 99.

Some ideas??

Hey @Matz, one way you could do is have the input contain these settings:

Then place the element in a group:

Then in the workflow you would have the following events for ‘Do When Condition is True’:

(the group that’s resetting is the group that the input is placed in)

*I tried putting these all under ‘one’ workflow ‘Do when condition is true’ Event, but it didn’t execute properly with a lot of the ‘OR’ statements. *Make sure you change the “Run This” part from ‘just once’ to ‘every time’ for each Event. But this should clear the input if a User enters something that is not between 0 and 99 :slight_smile:

2 Likes

Use a slider ?

Have a hidden integer input field that is set to the text input as default and use that … (Standard bubble hack to turn text to numbers) ?

You could have the input reset to empty if the value is less than 0 or greater than 99 and display an alert?

1 Like

Oh man Faye you beat me to it! Great minds…

1 Like

Because I’ve learned from your posts! :wink:

Thank you! The fake input is a very good trick to work around. Thank’s @NigelG

@fayewatson Good idea, but the user can still type 4,282 because it’s between 0 and 99.