OS (e.g. Win10): Mac OS X 10.14.4 PsychoPy version (e.g. 1.84.x): 3.1.0
**Standard Standalone? yes
This is a question about the slider component:
I want to use it as a radio button in a context where I can instruct subject to
‘select all that apply’
In other words, I want to display several items with radio buttons next to them and be able to have subjects choose as many or as few as they like.
My understanding of the slider / radio button is that you need to have at least 2 tick marks.
This is OK for TRUE / FALSE or YES/NO type answers, but does not work so well for ‘select all that apply’ – any ideas how this could be implemented (other than in a donkey way with lots of individually drawn rectangles that can be clicked with the mouse!)
Thanks
Marc
Hi Marc! I have the same question you described above, but I see that no one answered you. I believe you were able to figure this out based on a follow-up post you created. Would you mind sharing how you were able to create multiple radio buttons for a ‘select all’ response option using the slider component?
Thanks!
Jamie
yes, I solved it both for builder and PsychoJS (the latter with help from the fantastic @dvbridges).
But for Builder it is straightforward:
I have the following code component (EachFrame tab):
for thisRater in catchList:
if thisRater.getRating() in [1,2]:
responseChecker+=1
catchList.remove(thisRater)
if responseChecker >= 6 and mouse.isPressedIn(button):
continueRoutine = False
catchList is a list that contains all the radio buttons I created (they return 1 or 2 as answer), and there is a total of 6.
I also created an answer button (simply a rectangle with text “submit” inside)
Thanks for this. I was hoping you could clarify a little. Did you still end up using a slider component?
And what’s the format of catchList ? Is it the name of each response option (i.e. labels)? Are they in quotes? Do you have to include the name of slider component itself when referencing each radio button?
Yes, I did use the slider component and created a response button (just a polygon) with a mouse event that tracks clicks inside it.
I cannot answer in detail your questions about my catchList, because I am currently on strike and thus not able to access my computer where the experimental files live.
But from memory, catchList is composed of the individual radio button elements, referenced by name, and I don’t think in quotes.