embedded data for sliders | XM Community

embedded data for sliders

  • 30 September 2022
  • 5 replies
  • 10 views

Userlevel 2
Badge +1

I have a question with 4 scoring sliders (0-5) which are not mandatory. I would like you to set an embedded data that if a slider is unselected, the value should be 0.
Is that possible?


5 replies

Userlevel 7
Badge +27

Do you want embedded data fields or the value of the unselected sliders set to zero?

Userlevel 7
Badge +36

Simin
You can include 4 embedded data with a hardcoded value o '0' in it e.g.: ED1=0.
And at the end of survey or after block just update the embedded data via a branch logic something like this for all 4 sliders:
image.pngThe one's which have the value of 0, the respondent may have selected 0 or might have not slided the slider.

Hope this helps!


Userlevel 4
Badge +16

Great job on providing a solution Deepak along with screenshots! 🙂

Userlevel 2
Badge +1

TomG I want to set the value of the unselected sliders to zero.

Userlevel 7
Badge +27

https://community.qualtrics.com/XMcommunity/discussion/comment/50464#Comment_50464That's what I suspected. Use this:
Qualtrics.SurveyEngine.addOnPageSubmit(function() { 
jQuery("#"+this.questionId+" .ResultsInput").filter(function(){return this.value.length==0;}).val("0").trigger("change");
});

Leave a Reply