Javascript not working on a dropdown menu | XM Community
Skip to main content
Hello, I am trying to set embedded data based on a dropdown selection and it is not working. Here is my code Qualtrics.SurveyEngine.addOnload(function() { this.questionclick = function(event,element) { if (element.type == 'select'){ var choiceNum = this.getChoiceRecodeValue(element.id.split('~')[2]); } if (choiceNum == 01) { Qualtrics.SurveyEngine.setEmbeddedData('ClassComp','True'); } else if (choiceNum == 04) { Qualtrics.SurveyEngine.setEmbeddedData('ClassComp','True'); } I don't get an error but it doesn't do anything either. Ive recoded each answer but nothing seems to work. What am I missing?
Be the first to reply!