Change initial content / input value after user interaction with a form

I have two form fields that interact with another. Dropdown of Ticket type (Paid or Free), and an input for the Ticket Price.

When the dropdown is set to FREE, I have a condition to set the initial content of the ticket price to $0.00 and disable the Ticket Price input. This works fine on page load.

If the user switches the Type Dropdown to PAID, they can then edit the Ticket Price, as desired.

However, when they change the Type Dropdown back to FREE, the conditional state no longer changes the Ticket Price to $0.00. It leaves the value that is input by the user. How can I override user input to keep the form logic consistent?

I have tried using custom states as well but once the user interacts with an input, it doesn’t seem you can change it’s value via workflows or Conditionals after. Is that correct? Is there a way to do this?

Video of behavior: Dropbox - Screen Recording 2020-06-03 at 4.02.33 PM.mov - Simplify your life

2 Likes

The easiest way I can think of to do this would be to put the input in a group by itself and then use the “reset group/popup” action on that group. This should cause all inputs in the group to have their content set back to their initial content. However, this could cause issues with the tabbing order of your input form, and if the user switched back to PAID then their previous price wouldn’t be saved.

Another way to do this would be to have two inputs in the same location, one for paid and one for free. They should only be shown when the dropdown’s value is PAID or FREE, respectively. When you click submit, just grab the value from whichever input you need based on the dropdown’s value.

6 Likes

Hello Jaredg,

I have the the same issue that you!
I’m little bit disappointed to work with this in Bubble, I’ve made others functionality in Bubble that are amazing, but when I had to do this simple think I just got confused and spend a lot of time searching for.

I think that it has to be quite simple, just a way to set a input value, so I realized that the input value can’t be set for other element (just using custom state). So, can I set an input just using a custom state? I tried many ways, but I get the same as you.

I am looking for a while, if you already have the resolution, please tell me.
I’ll put the answer here when I find it.

Your post is the best that I found, Thank you!!!

1 Like

The post above from austin3 was the resolution. Put in a group and then in the workflow, under Element Actions, select Group Reset Data.

Nice, about to RESET it’s okay.
What do you say about change this value for example 450 instead 0(reset)? How do we do it? 1) Reset as you did. 2) change the value of input by the custom state?

Thanks

1 Like

I did!!!
Exactly such as austin3 said, it causes a problem with navigation order. It is another little problem that I will not take right now.
Thank you a lot!

Thank you, I was looking for it.

This topic was automatically closed after 70 days. New replies are no longer allowed.