Search code examples
javascriptsurveyqualtrics

How to read default choice values in multiple choice Questions in Qualtrics platform


I am trying to create a survey in Qualtrics and I need to get the hidden question default values once the survey is completed.

as of now i am getting NUll response when the question is hidden and even if i have selected default values for hidden questions.

Please check the sample survey here https://qfreeaccountssjc1.az1.qualtrics.com/jfe/preview/SV_01ZvjCb5OymyP09?Q_SurveyVersionID=current&Q_CHL=preview.

Survey Image: Survey Image

I have set condition on choice 10 and 30 it will not hide question and if it is selected 20 then question 2 will be hidden in above test survey and it's responses are not catched under data and analysis tab .

Please refer this screenshot so i need to capture it's responses via javascript.

enter image description here

so anybody can please help me on that.


Solution

  • we can use the below Method to Do above.

    Qualtrics.SurveyEngine.addOnload(function()
    {
        /*Place your JavaScript here to run when the page loads*/
    
         if("${q://QID1/SelectedChoicesRecode}"!="2") jQuery("#"+this.questionId).hide();
    
    });