In the context of an experiment I would like to have one page, where the experimenter chooses one or several from a set of experiment-parts that shall be executed.
This could be achieved with the “Form” module in the builder. The drawback of this solution is that one would need to indicate yes/no or each experiment-part. I’d prefer to simply check on checkboxes.
Hi @dvbridges, I’m trying to use checkboxes for my online study. I used your example as a template, but I can’t figure out how it is possible for participants to uncheck a box, if it was checked unintentionally. Could you try to help me with that?
And will this example also work on Pavlovia?
Hi @dvbridges,
I’m trying to use a checkbox in a loop (for an offline experiment). Your code worked well but if the checkbox has been ticked once, it appears as ticked on every next iteration of the routine.
Would you know how to fix that? That is, how to draw an unticked checkbox at each iteration of the loop independently of if it was checked previsously?
Many thanks for any advice!
Yes, just add the following code to the code component, to change the color back to the default. Add the code to the “Begin Routine” tab, so it looks like:
checkboxes = [box1, box2, box3]
clicked = []
for box in checkboxes:
box.color = "white"
Ahahah ^^ Easier than I thought! Thanks!
I also have a continue button that I would like to enable only if a slider component has been rated OR if the checkbox has been ticked.
I tried
if my_slider.getRating() is not None or mouse.isPressedIn(box):
continueButton.buttonEnabled = True
But it does not work at all (the script crash).
I do not wish to take your time but if you have any idea…