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.
What I want to achieve is to have either (or whatever works between these two options):
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.
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.
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:
1 selection, happy face:
>1 selection, sad face:
This avoids circular references and potentially annoying the end user.
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.
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.
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.
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.
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".