How can I limit the number of items a user can add in Bubble.io based on the item's capacity stored in the database?

Can anyone help me how to achieve this?

There are lots of products that has different capacity from the database for example item1’s capacity is 5 and item2’s capacity is 10 if the user picks item1 then adding it regardless if it is children or adult it should not exceed based on the item’s capacity

Have a condition on the workflow Only when (the number selected) < item's capacity that means it can only be increased when there is sufficient capacity.

1 Like

Another thing you can do is maybe use a slider, you know it has range, so you can restrict what the user pics from the slider range value

May I know what that (the number selected) is?

I think he means the number (1) in the screenshot you provide.

You can add conditions to the (+) buttons on the screen, and the condition should be something like: Element is Not Clickable WHEN (item1+item2 >= the item capacity)

the >= symbol means greater than or equal to, but in Bubble it’s joined

2 Likes