953
Views
9
Comments
Solved
Radio button should selected one by default
Question

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.

2021-07-14 09-27-33
Luís Cardoso
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

LuisTestDemo.oml
2021-07-14 09-27-33
Luís Cardoso

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:

2019-06-02 09-04-06
Ayu Andini

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

2021-07-14 09-27-33
Luís Cardoso

This is just an example, you can use text also

2019-06-02 09-04-06
Ayu Andini

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.

2021-07-14 09-27-33
Luís Cardoso

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?

2019-06-02 09-04-06
Ayu Andini

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

2021-07-14 09-27-33
Luís Cardoso
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

LuisTestDemo.oml
2024-06-19 07-19-32
JitendraYadav

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

2021-03-18 21-03-15
Benjith Sam
 
MVP

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.