Forum Academy Marketplace Showcase Pricing Features

Conditional radio input

I have a form that has a currency input and a radio input. The radio input has two options, Yes or No.

If the user enter a number > than 0 in the currency input, I want the radio input to only allow the user to select No. This means the user can only select Yes in the radio input, if they put 0 in the currency input.

If the user selects Yes in the radio input, and then selects a number greater than 0 in the currency, I want the radio to change the input to No and not allow the user to change it back to Yes.

What is the best tool to accomplish this?

What are you trying to achieve with this? This will help us to better understand how to help you and a link to look at if you can

Is this maybe what you are trying to achieve? https://bubble.io/page?type=page&name=conditional-radio-buttons&id=forumapp3&tab=tabs-1

2 Likes

@raymond I don’t want the user to be able to submit the form with the radio selected as “yes” if they also have a number > than 0.

If number is 0, user can choose “yes” or “no” for the radio input.
If number is > 0, user cannot choose “yes” or “no”, radio input must be selected as “no”,

I tried your example, but it didn’t seem to work. I turned the toggle to “on”. Then I changed the number to 55. I was expecting the toggle to turn back to off, and be frozen as off. However, it was frozen in the on position.

Sorry could not get it right. It might be easier to help if you give a link or recreate it on the forum app.

@raymond
I updated the example… https://bubble.io/page?type=page&name=conditional-radio-buttons&id=forumapp3&tab=tabs-1

The app successfully freezes the radio button if a number is greater than 0. The next step I want to create is an event that will change the radio button to “no” if a number greater than 0 is added.

Have a look at the updated version

3 Likes

@raymond this worked perfectly, thanks

2 Likes