1923
Views
6
Comments
Radio button
Question

Hello everyone.


I trying to disable two radio buttons (Yes and No), to oblige the user have to make a choice. I don't want default to any. This two radio buttons are the same variable.


It's possible?



2016-06-29 09-25-29
Thomas Robinson

Hi José,

I don't understand what you want to implement. Do you want two radio buttons to share the same variable in the "Value" property or you want to enable/disable both using the same var?

Meanwhile, you check the documentation about radio buttons.

Regards,
Thomas

2015-12-10 14-53-26
José Fernandes

I have a variable that is from boolean type. 

I want the user is obligue to put one of that options from radio button ("Yes" or "No"). But in my application for default, it's allways selected the option "No". 

My questions is possible to put the two options without any pre-selection.

Thanks!

2020-10-02 21-47-41
Samuel Nunes Marques

Your application has always the option "No" selected because you have an boolean variable that is false by default. You can assign an integer local variable to your radio buttons and assign the values of each radio button and create some logic for it, like 0 is false and 1 its true. Now there is no default value on the radio buttons.

Regards,

2014-12-03 16-46-31
Andrew Tabata

Hi José,

Instead of a boolean, use a Text Variable and when it renders the page, set the default to "", and whenever the user selects either option, it places as "Yes" or "No". When validating check if the variable is filled in or not, and that should do the trick. 

Your variable at the moment appears as already selected because in OS the default Value of boolean is False, so false is selected by Default.


Hope it Helps,

Best Regards,

Andrew Tabata

2015-12-10 14-53-26
José Fernandes

I've test the solution of Samuel Marques and it works fine.


Thanks for all.

2019-03-24 20-44-19
Hugo Dias


I've implemented the solution suggested by Samuel Marques and it works great!


Thank you Samuel.

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