2

Should I use a radio button or checkbox or something else to indicate which row is the primary selection?

Screenshot showing radio buttons next to input fields in rows

5 Answers 5

5

Radio buttons are correct in this case, unless you can have more than one primary supervisor, in which case, checkboxes are correct. However, if you have more than a few rows, and especially if you're using pagination, it might become tricky to quickly see which supervisor is the primary.

Another way to set this is to add all of the supervisors into a dropdown menu below the table, and let the user select the primary there.

3
  • I suggested that but the dev team said this is easier rather than writing code logic for dropdown lists and disabling items in the dropdown list if one primary is already selected.
    – sam
    Sep 30, 2022 at 21:51
  • Why would anything in the drop down list need to be disabled? It could just default to whomever was selected as primary if that was previously set. But radio buttons work as well.
    – Izquierdo
    Sep 30, 2022 at 23:10
  • If there's only one primary supervisor, the logic for setting the 'checked' attribute on the radio input element is going to require pretty much the same effort as setting the 'selected' attribute on an option element. If there's multiple supervisors, the added backend logic scales pretty much equally to the frontend code. If you can afford to, try and understand a little better what their actual concerns are. Maybe it's more involved than I can tell from the sideline, but it does have a whiff of a fallacy. Oct 1, 2022 at 8:36
2

This blog article has been mentioned on Twitter with regard to when to use a checkbox and when to use a radio button.

In short: If you ask a question use radio buttons, if you want confirmation / selection of a statement use a checkbox.

1

This is a very weird edge case actually - good find!

In my opinion, checkbox would be the right choice here. Let me explain:

Technically, this is what is called a radio button group, as @izquierdo is saying. Meaning a bunch of options belonging together, user can only pick one, best practice radio buttons, bob is your uncle. Like:

What is your favorite animal?
🔘 Cat
⭕ Dog
⭕ Horse

The thing is that (at least for me) it is very hard to perceive the three buttons as a group, because every person seems to be a group in itself, if you know what I mean?

It is almost a multidimensional form you built there: Each person is a unit, but then the is-supervisor question is also a group stretching over all the people. Meaning that if you only perceive the people as their own groups, the three inputs for Primary Supervisor are "pulled apart" and don't feel like a group at all.

And I think asking your user to understand this double-grouping is indeed a big ask.

Instead, what I perceive is a list of people where for each person you are asking whether that guy or gal is the/a "Primary Supervisor". And as @yahalnaut is hinting at, that is a yes/no question, meaning check box. To illustrate my mental model:

Person A, some data, ☐ is this person the Primary Supervisor?
---
Person B, some data, ☒ is this person the Primary Supervisor?
---
Person C, some data, ☐ is this person the Primary Supervisor?

Now you have the extra programming requirement to disable the other two checkboxes whenever a new one is selected (which might feel silly because that is what radio groups do anyways, but is easily implemented), but if my mental model is anything like that of your users, it is better and more quickly understood.

Usertest this!

1

You should use checkbox here. The key being radio buttons present set of mutually exclusive options. Checkbox presents - "yes", "no" and optionally "maybe". From Apple design guidelines good read- please visit:

If you need to show that a setting or item has a mixed state, consider using a checkbox instead.

Prefer a set of radio buttons to present mutually exclusive options. If you need to let people choose multiple options in a set, use checkboxes instead.

Avoid listing too many radio buttons in a set. A long list of radio buttons takes up a lot of space in the interface and can be overwhelming. If you need to present more than about five options, consider using a component like a pop-up button instead.

I do not develop for iOS or MacOS but these guidelines are really well written and consistent. I recommend having a read.

1

Alright. We did away with check boxes, radio buttons. Instead i'm going to create a table and maybe use a dropdown list/ checkbox to indicate primary supervisor.

Not sure if it's the best approach, but that's what the product said he wanted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.