Drop Down List | XM Community
Skip to main content
Question

Drop Down List

  • August 11, 2020
  • 2 replies
  • 10 views

I have the following code for a drop down list used in a different form that is being converted to Qualtrics. I created a drop down list. How can I convert code to work for Qualtics? Any help is appreciated!

2 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • August 11, 2020

Put the above HTML code in the the HTML view of the descriptive question.
Create two embedded data in the survey flow as the first element in the survey flow - "SelValue","SelText".
Paste the below code in the JS of the descriptive question under onReady function:
jQuery("#NextButton").on('click',function(){

var v = jQuery(".transform").find("option:selected").val();
var t = jQuery(".transform").find("option:selected").text();

Qualtrics.SurveyEngine.setEmbeddedData("SelValue", v);
Qualtrics.SurveyEngine.setEmbeddedData("SelText", t);

});



  • Author
  • August 12, 2020

Thanks for the help! Works great!