Radio buttons for yes/no

Hello! I have issue with radio buttons element for boolean field. I need simple switcher for my test status (active/non-active). I choose Dynamic choices and type “yes/no”. What I should to put in the Choices source?

Hey @aqqura,

The way you have it currently set up expects each radio button to be a yes/no value for a different Thing. I’d actually use an ionic toggle for this as the setup and value change will be much more straight forward for the field type. You can set it to yes/no, default to page’s active field, and auto-bind to the same field so that a single click changes the value.


Gaby | Coaching Bubble

1 Like

Hello! Can I use Dropdown element with Type of choices “yes/no” for the case?

That would be similar to the radio button situation. Although if you really wanted to use either use either, set them to static values yes and no, and have 2 workflows:

When dropdown/radio is changed and value is yes > make change to Current Page’s Thing: active = yes

When dropdown/radio is changed and value is no > make change to Current Page’s Thing: active = no

1 Like

Thanks for this! In some scenarios radio buttons are better than Toggle from a design perspective, because the radio button label can describe what the option is instead of having to have a title and/or 2 descriptions for the toggle being Yes/No.

So thank you for giving the solution here!

I’m struggling with this. I don’t understand how to implement your answer. I have a data entry page and lots of yes/no fields and I don’t understand why I can’t get the two to link. I’m not sure what Current Page’s Thing: active = yes is supposed to be / where it’s supposed to go. Can you clarify please? TIA

Hi @romanmg , I’m trying to implement your suggestion, but there must be something I’m not doing right because the field won’t get updated!

So, I have a field called “sim_nao” with the “Auto-binding” option on (as you can see below):

image

In the Privacy Data tab, I’ve configured the following role:

So, is basically open to everyone (as it’s a test environment).
In my workflow, the field is NOT configured as I assume that “auto-binding” will do the trick, BUT no matter how hard I try, the field doesn’t get populated… :disappointed:

image

What am I doing wrong?
Thank you!
Luiz

Running into the same issue and found a workaround that may help others.

  1. Create a new option set with attribute yes / no (“Yes” mapping to the boolean yes and “No” mapping to the boolean no)

  2. On the radio buttons, choose Dynamic choices > yes / no > Option set Yes / no : each items’s yes / no

6 Likes

Wow, @jayy nice. Silly that a workaround needs to be created at all, but this works well, thanks!

1 Like

I do the same always

The answer to my question I came here to get an answer to! From experience, if Gaby says it it’s the way to go.

I did it like this: I put yes/no in the database and the radio button I put static “Sim” and “Não” in the workflow put it as in the image below, so when the radio is “Sim” it puts “yes” and when the radio is “Não” it puts “no”.

Remembering that I wrote the “Sim” in the workflow.

image