﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » checkboxes correct responses and data</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 05 Apr 2026 05:52:48 GMT</lastBuildDate><ttl>20</ttl><item><title>checkboxes correct responses and data</title><link>https://forums.millisecond.com/Topic25529.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;I'm having trouble using checkboxes. I want to display a list of options from which participants can select up to six - but only two are correct. It works correctly until I add 'correctresponse' which makes the question stay red and doesn't allow me to answer the question. Script below -&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey memorytest&amp;gt;&lt;br/&gt;/ pages = [1 = p1]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage p1&amp;gt;&lt;br/&gt;/ questions = [1 = q1]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes q1&amp;gt;&lt;br/&gt;/ caption = "Please choose a maximum of six options you saw previously in the experiment:"&lt;br/&gt;/ options = ("Cadbury", "Twix", "Wrong", "Wrong", "Wrong", "Wrong", "Wrong", "Wrong")&lt;br/&gt;/ range = (1,6)&lt;br/&gt;/ order = random&lt;br/&gt;/ correctresponse = ("Cadbury", "Twix")&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;What is the issue here? Also is there a way of including number or correct answers in my summary data - I don't care which ones they got right (cadbury or twix), only how many.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Jenny&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 17 Sep 2018 07:38:03 GMT</pubDate><dc:creator>jm560@sussex.ac.uk</dc:creator></item><item><title>RE: checkboxes correct responses and data</title><link>https://forums.millisecond.com/Topic25533.aspx</link><description>&lt;div data-id="25529" class="if-quote-wrapper" unselectable="on" data-guid="1537193941536"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25529" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="25529" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="25529" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:jm560@sussex.ac.uk"&gt;jm560@sussex.ac.uk&lt;/a&gt; - Monday, September 17, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-25529"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;&lt;br/&gt;I'm having trouble using checkboxes. I want to display a list of options from which participants can select up to six - but only two are correct. It works correctly until I add 'correctresponse' which makes the question stay red and doesn't allow me to answer the question. Script below -&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey memorytest&amp;gt;&lt;br/&gt;/ pages = [1 = p1]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage p1&amp;gt;&lt;br/&gt;/ questions = [1 = q1]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes q1&amp;gt;&lt;br/&gt;/ caption = "Please choose a maximum of six options you saw previously in the experiment:"&lt;br/&gt;/ options = ("Cadbury", "Twix", "Wrong", "Wrong", "Wrong", "Wrong", "Wrong", "Wrong")&lt;br/&gt;/ range = (1,6)&lt;br/&gt;/ order = random&lt;br/&gt;/ correctresponse = ("Cadbury", "Twix")&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;What is the issue here? Also is there a way of including number or correct answers in my summary data - I don't care which ones they got right (cadbury or twix), only how many.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Jenny&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25529"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;You cannot use /correctresponse for that. Instead, you'll need to use some /ontrialend logic on the &amp;lt;surveypage&amp;gt; hosting the checkbox question to evaluate the response (check for correctness of the selected options, count the number of correctly selected options). One useful thing to do in addition is to use /optionvalues, you could encode the correct options as "1" and all the wrong ones as "0", which will make the counting easier. Finally, you'll want to store the information of interest in &amp;lt;values&amp;gt; and log those to your summary data file as needed. Something like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;survey memorytest&amp;gt;&lt;br/&gt;/ pages = [1 = p1]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage p1&amp;gt;&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.nchecked = checkboxes.q1.checked.1 + checkboxes.q1.checked.2 + checkboxes.q1.checked.3 + checkboxes.q1.checked.4 + checkboxes.q1.checked.5 + checkboxes.q1.checked.6 + checkboxes.q1.checked.7 + checkboxes.q1.checked.8;&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.ncorrect = length(checkboxes.q1.response) - length(replaceall(checkboxes.q1.response, "1", ""));&lt;br/&gt;]&lt;br/&gt;/ questions = [1 = q1]&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;checkboxes q1&amp;gt;&lt;br/&gt;/ caption = "Please choose a maximum of six options you saw previously in the experiment:"&lt;br/&gt;/ options = ("Cadbury", "Twix", "X1", "X2", "X3", "X4", "X5", "X6")&lt;br/&gt;/ optionvalues = ("1", "1", "0", "0", "0", "0", "0", "0")&lt;br/&gt;/ range = (1,6)&lt;br/&gt;/ order = random&lt;br/&gt;&amp;lt;/checkboxes&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ ncorrect = 0&lt;br/&gt;/ nchecked = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;summarydata&amp;gt;&lt;br/&gt;/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.nchecked, values.ncorrect)&lt;br/&gt;&amp;lt;/summarydata&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 17 Sep 2018 07:38:03 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>