Add exclusive response (don't know) option to Rank Order Matrix Question | XM Community
Skip to main content
Solved

Add exclusive response (don't know) option to Rank Order Matrix Question

  • March 24, 2021
  • 3 replies
  • 423 views

Forum|alt.badge.img

Hello,
I am trying to add a don't know option to my rank order question. I'm aware that this may not be best practice, but our client is asking to include this option.
In this question, we have 4 items we're asking users to rank from 1 to 4. However, I'd like to include a don't know option to this question AND have that don't know be an exclusive option (e.g., if the user selects don't know, they won't have any other responses recorded). I've found the code to hide radio button and columns to try and call out the don't know as much as possible, but it is STILL possible for a user to rank these options AND select "don't know". See image below for an example.
I'm happy to adjust the question to any other rank type, but I need the don't know option to be exclusive.
Thanks,
Mark

image.png

Best answer by ahmedA

Custom Validation:
image.pngimage.png
Caveat, de-selecting radio buttons is not possible using the default functionality. So, if they select anything else and then decide to select E, then the survey will not move forward.

3 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2050 replies
  • Answer
  • March 24, 2021

Custom Validation:
image.pngimage.png
Caveat, de-selecting radio buttons is not possible using the default functionality. So, if they select anything else and then decide to select E, then the survey will not move forward.


Forum|alt.badge.img
  • Author
  • 20 replies
  • March 25, 2021

Thanks so much!


Forum|alt.badge.img+2
  • 13 replies
  • December 5, 2022

Qualtrics.SurveyEngine.addOnReady(function()
{
   /*Place your JavaScript here to run when the page is fully displayed*/

   var that = this;
   jQuery("input[type*=checkbox]").on("click",function()
   {
      var el = jQuery(this);
      setTimeout(function(){ enDB(); },50);
   })
   enDB();
   function enDB()
   {
      if( jQuery("input[type*=checkbox]:checked").length>0 )
      {
         jQuery("input[type*=radio]").each(function()
         {
            var rowID = jQuery(this).attr('id').split('~')[2];
            var scaleID = jQuery(this).attr('id').split('~')[3];
            that.setChoiceValue(rowID,scaleID,0)

         });
         jQuery("input[type*=radio]").parent().attr("disabled","disabled").css({"pointer-events":"none","background-color":""});
         jQuery("input[type*=radio]").attr("disabled","disabled").css("pointer-events","none");
      }
      else
      {
         jQuery("input[type*=radio]").removeAttr("disabled").css("pointer-events","");
         jQuery("input[type*=radio]").parent().removeAttr("disabled").css("pointer-events","");
      }
   }
});