Group: Forum Members
Posts: 3,
Visits: 4
|
Hi guys!
I am recently trying to generate a multiple choice survey for a study (using 5 pictures at a time where subjects should pick one of these). I altered the code from a survey example (the one with the baby cats and puppies).
A problem I can't solve myself is that I don't know how to tell Inqisit that they only can pick one option and not two ore more. Is the problem in the "surveypage" command? Would be great if you could help me out :-)
Cheers
Jonathan
Here is the code:
<expressions> / bagcount = checkboxes.aktetas40.checked.1 + checkboxes.damestas40.checked.1 + checkboxes.rugzak40.checked.1 + checkboxes.stoftas40.checked.1 + checkboxes.buiktas40.checked.1 </expressions>
<item selectedbags> </item>
<checkboxes aktetas40> / options = ("1") / optionvalues = ("aktetas40.gif") / position = (25, 34) / required = false </checkboxes>
<checkboxes damestas40> / options = ("2") / optionvalues = ("damestas40.gif") / position = (50, 34) / required = false </checkboxes>
<checkboxes rugzak40> / options = ("3") / optionvalues = ("rugzak40.gif") / position = (75, 34) / required = false </checkboxes>
<checkboxes stoftas40> / options = ("4") / optionvalues = ("stoftas40.gif") / position = (25, 59) / required = false </checkboxes>
<checkboxes buiktas40> / options = ("5") / optionvalues = ("buiktas40.gif") / position = (50, 59) / required = false </checkboxes>
<picture aktetas40> / items = bagoptions / position = (25, 23) / size = (20%, 20%) / select = 1 </picture>
<picture damestas40> / items = bagoptions / position = (50, 23) / size = (20%, 20%) / select = 2 </picture>
<picture rugzak40> / items = bagoptions / position = (75, 23) / size = (20%, 20%) / select = 3 </picture>
<picture stoftas40> / items = bagoptions / position = (25, 48) / size = (20%, 20%) / select = 4 </picture>
<picture buiktas40> / items = bagoptions / position = (50, 48) / size = (20%, 20%) / select = 5 </picture>
<item bagoptions> /1 = "aktetas40.gif" /2 = "damestas40.gif" /3 = "rugzak40.gif" /4 = "stoftas40.gif" /5 = "buiktas40.gif" </item>
<surveypage bagpage> / caption = "Je zal nu 1 tas stelen. Kies zorgvuldig 1 tas uit en steel ze door er op te klikken." / questions = [1=aktetas40; 2=damestas40; 3=rugzak40; 4=stoftas40; 5=buiktas40] / stimulusframes = [1=aktetas40, damestas40, rugzak40, stoftas40, buiktas40] / branch = [if (expressions.bagcount != 1) surveypage.bagpage; ] /recorddata = true </surveypage>
<survey bagselectionphase> / pages = [1=noreplace(bagpage)] / fontstyle = ("Verdana", -27, false, false, false, false, 5, 0) / itemfontstyle = ("Verdana", -16, false, false, false, false, 5, 0) / showpagenumbers = false / onblockend = [ if( checkboxes.aktetas40.checked.1 == true) item.selectedbags.item = checkboxes.aktetas40.optionvalue.1 ] / onblockend = [ if( checkboxes.damestas40.checked.1 == true) item.selectedbags.item = checkboxes.damestas40.optionvalue.1 ] / onblockend = [ if( checkboxes.rugzak40.checked.1 == true) item.selectedbags.item = checkboxes.rugzak40.optionvalue.1 ] / onblockend = [ if( checkboxes.stoftas40.checked.1 == true) item.selectedbags.item = checkboxes.stoftas40.optionvalue.1 ] / onblockend = [ if( checkboxes.buiktas40.checked.1 == true) item.selectedbags.item = checkboxes.buiktas40.optionvalue.1 ] </survey>
|