Select to view content in your preferred language

Disable Checkbox of Multiple Select Question or Change Radio Button of Select One Question to Checkbox

377
7
12-04-2024 04:12 AM
jantolihao
Regular Contributor

Hello, everyone!

I have here a Select One question type named Status of Project where choices are "Started" and "Not Yet Started". Please see screenshot below. 

jantolihao_0-1733313612420.png

What I want to achieve is to have either (or whatever works between these two options):

  • A Select One question type Status Project with Checkboxes beside the choices, or
  • A Select Multiple question type Status Project where other option's checkbox will be disabled once an option is selected.

In other words, I wish to configure a question where the user is only allowed to choose one option using a checkbox. I already looked into Constraints concept, but this will still allow the user to check the checkbox but is only validated during submission of records, thus, will not allow to send it. 

I need something that is either of the choices above. Does anyone have an idea on how to achieve this? Is this possible with javascript? If yes, I would appreciate any hints regarding this. 

Thank you.

0 Kudos
7 Replies
DougBrowning
MVP Esteemed Contributor

The closest I have got to this is to turn the field to read only once the question after it is answered.  This worked out fine since if you immediately make it read only as you propose, what if the user tapped by accident - they are stuck.  This way they can select the first question, can change their mind, but the second they fill out the next question it goes read only and locks in their answer.

Like here I am going read only as soon as they add a repeat.

FieldGoReadonly.gif

 

 

0 Kudos
abureaux
MVP Frequent Contributor

This sounds like a dependency cycle. Separately, this also sounds like it could be very annoying for users.

A select_multiple that effectively only allows one choice is a select_one. Why not just make this a select_one?

To steal a play from @DougBrowning, I'd recommend using something like emoji's in conjunction with constraints (see attached example)

No selection, no emoji:

abureaux_0-1733328185300.png

1 selection, happy face:

abureaux_1-1733328191742.png

>1 selection, sad face:

abureaux_2-1733328197807.png

This avoids circular references and potentially annoying the end user.

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Yes if you try and use count-selected on itself its a dependency.  I also have no idea why you would want a select multiple that can only have one choice?  That is a select one.

abureaux
MVP Frequent Contributor

Totally agree. I meant to add a second disclaimer above to this effect.

While it is technically possible, I highly discourage this type of implementation as it deviates from well-established design norms.

jantolihao
Regular Contributor

Hello, @DougBrowning.

Thanks for the response. Yeah, I got your point. But I need something with checkboxes, not a radio button if I will use a select one question type. Select One question type default display is a radio button, not a checkbox, thus, my options above. Client's requirement is "can only choose 1 option using a checkbox, not a radio button", so, I'm really having a hard time finding solution for this.

jantolihao
Regular Contributor

Hello, @abureaux.

Thanks for the response. Yeah, I got your point. However, client's requirement is to use checkbox but can only be allowed to select one option, thus, my options above. Select One question type display is a radio button, not a checkbox. Client does not want a radio button. Actually, this is a concern on design. So, I'm trying to find any information here that could help my case.

abureaux
MVP Frequent Contributor

Clients can ask for some strange things... This design choice in particular irks me.

But if you are forced into using check boxes, my example above will hopefully work. You can of course change the conditional behaviour to be more visually appealing. But beyond that style of deployment, I don't think you will get anything much better. That behaviour just isn't "normal".

0 Kudos