Reply To: Having participants select more than one option in questions

PennController for IBEX Forums Support Having participants select more than one option in questions Reply To: Having participants select more than one option in questions

#7347
Jeremy
Keymaster

Hi,

There is a not-yet-documented command on Scale elements called checkbox which turns the options into checkoxes that can all independently be on/off. By default each option will appear as a label next to a checkbox, but you can use CSS rules to customize the rendering. For example, if you want to only keep the text labels and have a dotted frame appear around the selected options, you can add this to global_main.css:

.PennController-Scale .option {
    margin: 1em;
}
.PennController-Scale .option input[type="checkbox"] {
    display: none;
}
.PennController-Scale .option input[type="checkbox"] + label {
    border: medium dotted transparent;
    padding: 0.25em;
}
.PennController-Scale .option input[type="checkbox"]:checked + label {
    border-color: black;
}

Example trial for reference:

newTrial(
    newScale("answer", "hello", "world")
        .checkbox()
        .print()
    ,
    newButton("Hello world")
        .print()
        .wait()
)

Jeremy