Radio button should selected one by default

Hi,

I've 3 radio button with same variable/attribute and different value in form.

I'm looking for help to make the first radio button should be selected by default.

Thanks.

Hello Ayu,

In preparation or OnReady you should assign the value of that default radio button to the variable that you are using. Another way is to assign that value as the default of the variable.

Please see the properties below:

Luís Cardoso wrote:

Hello Ayu,

In preparation or OnReady you should assign the value of that default radio button to the variable that you are using. Another way is to assign that value as the default of the variable.

Please see the properties below:

Hi Luís,

Data type Var1 must integer? because in table db should be text.

Thanks

This is just an example, you can use text also

Luís Cardoso wrote:

This is just an example, you can use text also

Yess it works, but the radio button can be selected 2.

Do you have the same value for both radio buttons? 

Can you show it how did you define the value os the radio buttons please?

Luís Cardoso wrote:

Do you have the same value for both radio buttons? 

Can you show it how did you define the value os the radio buttons please?


I don't have the same value for both radio button

Solution

Ok. Does it happen when you select the second radio button?

Please see my oml in attachment with an example. You can test it here: https://luiscardosokinetit.outsystemscloud.com/LuisTestDemo/Radiobuttons.aspx

Solution

on preparation assign the value to radio button variable which u want to be selected by default.

Hi Ayu,

In addition to the previous solution statements you can refer this post as well: https://www.outsystems.com/forums/discussion/61600/how-to-deselect-the-radio-on-click-of-selected-radio/#Post239740


Hope this helps you!

Regards, 

Benjith Sam