Deselect side-by-side responses | XM Community
Skip to main content

I need to present a question to respondents such that each row provides a separate yes/no question for three separate items, as below. (below is not the actual question. It is the format I need: X number of rows and three columnar items per row - ie, sea creatures- where the respondent can select yes or no for each columnar item). 

 

 

I have been unable to create a question in this format which meets the following criteria: 

  1. Makes each yes/no pair a separate data point (so, in the above, there would be 6 total yes/no responses, each a separate column in a data export). 
  2. Prevents a user from selecting BOTH “yes” and “no” in a given sea creature-color pair, and
  3. Allows the respondent to deselect responses so that neither “yes” nor “no” is checked. 

 

With question type “Matrix Table” and matrix type “Likert” and answer type “Allow multiple answers" I can set the columns to “make answer exclusive.” This setting will change a “no” answer to a “yes” answer”, but also the respondent to select and deselect. (as well as changing the radio buttons to check boxes). 

However, in the “Matrix Table” format, I can find no way to create column groupings such that each row is read by Qualtrics as three separate questions which behave as desired. They are read as ONE question, and “make answer exclusive” applies against all the other choices in that row rather than ONLY the yes/no pair for each columnar type (ie, sea creature). 

This is as close as I have come with the Matrix Table approach, and it does not accomplish what I need: 

 

Per client instructions, I cannot change the question wording, nor can I change the layout of the items/question. I cannot create a drop-down selection or any other similar formatting changes. This is an e-version of a paper survey and the client agency is not flexible on the presentation of the questions / items. 

 

NOTE: I believe I am asking a similar question to the one below. That question appears to remain unanswered, as the responses appear to use the Matrix Table approach described above and thus do not suit this situation for the reasons described above. Also, I wanted to re-ask outside the Developer Corner forum area in case there are other options.

 

I would appreciate assistance with identifying approaches to accomplish this behavior . Thank you!! 

Hi, I have pasted a possible solution for this below. Try this full java below in your side by side question. Sorry in advance if the brackets at the end need some TLC, I had more rows in my code than your sample question.

*Editing to add some bonus keyword so people can find this when they search, and an explanation of each section*

keywords: Side by Side, Side-by-side, deselect, de-select, school health profiles, check boxes, 

  1. The numbers/letters following QID is your Qualtrics question number (the number following Q in the top left corner of the item you're on, for my test code this was Q2, you should only use what follows the Q if applicable). 
  2. The first number after that (between the # and the first ~, is referencing the main column of the side by side (1 directs to the fish column). 
  3. The next number (between the first and second ~ symbols) is referring to the row (1 here means red). 
  4. The last number would refer to Yes or No (1 is Yes because that's the first option, and 2 is No because that is second). 

Then we need to repeat this for each of the other columns in the first row by copy/pasting the four lines that start with document, and then changing the first number  (to 2 for crabs and then 3 for eels). 

Once you have an entire row coded, then you will repeat this for each of the subsequent rows, copy/pasting everything, but this time changing the middle number to reflect the row number you are on (2 for blue, 3 your next color, etc.; I have notes in the code below to keep track; notes are between the /* */ symbols).

 

 

Qualtrics.SurveyEngine.addOnload(function()

{

      /*Place your JavaScript here to run when the page loads*/

 this.questionclick = function(event,element){

/* This is for the first row, red*/

document.getElementById("QR~QID2#1~1~1").onclick = function(){

document.getElementById("QR~QID2#1~1~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#1~1~2").onclick = function(){

document.getElementById("QR~QID2#1~1~1").checked=element.unchecked;}

      

document.getElementById("QR~QID2#2~1~1").onclick = function(){

document.getElementById("QR~QID2#2~1~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#2~1~2").onclick = function(){

document.getElementById("QR~QID2#2~1~1").checked=element.unchecked;}    

      

document.getElementById("QR~QID2#3~1~1").onclick = function(){

document.getElementById("QR~QID2#3~1~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#3~1~2").onclick = function(){

document.getElementById("QR~QID2#3~1~1").checked=element.unchecked;}          

      

/* This is for the second row, blue/

document.getElementById("QR~QID2#1~2~1").onclick = function(){

document.getElementById("QR~QID2#1~2~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#1~2~2").onclick = function(){

document.getElementById("QR~QID2#1~2~1").checked=element.unchecked;}

      

document.getElementById("QR~QID2#2~2~1").onclick = function(){

document.getElementById("QR~QID2#2~2~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#2~2~2").onclick = function(){

document.getElementById("QR~QID2#2~2~1").checked=element.unchecked;}    

      

document.getElementById("QR~QID2#3~2~1").onclick = function(){

document.getElementById("QR~QID2#3~2~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#3~2~2").onclick = function(){

document.getElementById("QR~QID2#3~2~1").checked=element.unchecked;}    

 

 

 /* This is for the third row, third color*/

document.getElementById("QR~QID2#1~3~1").onclick = function(){

document.getElementById("QR~QID2#1~3~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#1~3~2").onclick = function(){

document.getElementById("QR~QID2#1~3~1").checked=element.unchecked;}

      

document.getElementById("QR~QID2#2~3~1").onclick = function(){

document.getElementById("QR~QID2#2~3~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#2~3~2").onclick = function(){

document.getElementById("QR~QID2#2~3~1").checked=element.unchecked;}    

      

document.getElementById("QR~QID2#3~3~1").onclick = function(){

document.getElementById("QR~QID2#3~3~2").checked=element.unchecked;}

 

document.getElementById("QR~QID2#3~3~2").onclick = function(){

document.getElementById("QR~QID2#3~3~1").checked=element.unchecked;}

 }

 

 

});


Leave a Reply