Forum Academy Marketplace Showcase Pricing Features

Increasing the Value of an Input When Icon is Clicked

I have a multi-step form using custom states, whose inputs do not get saved to the database until the save button on page 4 gets clicked. I’m trying to increase/decrease the value of an input when a button is clicked (see attached image). I can’t figure out how to do this. Capture

Something like this:

Here’s a version of what you’re doing:

Container:


^^^ note custom states

Minus sign:

Counter:

Plus sign:

Workflow: On page load, initialize the widget:





Workflow: Minus sign is clicked:




Workflow: Plus sign is clicked:




The above type of system creates a (-) [value] (+) type widget that acts like it’s autobound to some property of an object.

4 Likes

woah nice Keith

One of the first things I ever built in Bubble, @anon65040322! Easy-peasy. :wink:

This is great! Thanks so much!

Hi, I’m using something similar for my application. The only difference is that I don’t have the input disabled. (i.e. the user can type in a number)
The issue that I’m getting is that if the user does enter an input, and then decides to click on the pus or minus icon, it triggers the backend perfectly fine but does not display it on the input field

Have you tried “reset relevant inputs” only when “input XYZ’s value is not empty” after change. It might revert to it’s calculated “initial content” value.

1 Like