Visibility Logic to add/remove input fields from radio button select

Something that should(in theory) be very easy, is proving otherwise. I have already read a couple comments on this subject, and the instructions should be easily tailorable to my needs, but upon all attempts, the logic just is not working. Here is the most basic scenario I can think of for this, can someone please explain to me how to make the data binding/logic work in this regards?..

2 Radio Buttons within RadioGroup1: Radio1 Radio2

2 Text Fields: Field 1 Field 2

When Radio1 is selected Field 1 is visible and Field 2 is hidden, and when Radio2 is selected, Field 2 is visible and Field 1 is hidden.

Again, I know this should be super simple, but I can not, for the life of me, get this functionality to work correctly. Any assistance would be greatly appreciated!

Hi Michael,

Here’s the layout of my page:

The radio buttons in the group have the following values: radio1 and `radio2’:

For the Radio Button group I defined the following logic:

The logic is for the On Change event:

The input fields have the following data binding for the Visibility property:

Input 1 visibility:

Input 2 visibility:

Radio 1 is marked to be Checked by default:

Finally, the On Page Enter event sets up the initial value for data binding:

And here’s the final result:
https://www.backendless.us/api/files/ui-builder/containers/support/index.html?page=radio

Hope this helps.

Mark

1 Like

Thanks, I think thats exactly what I was looking for! Apricate the quick response!!