How can I set a default slider response from a previous slider response? | XM Community
Solved

How can I set a default slider response from a previous slider response?

  • 22 June 2018
  • 6 replies
  • 352 views

I am trying to set a slider starting value (which is also a default response) using a previous slider response.

What I have been trying to do is set an embed variable and then use JS to get it into the question.

So say I set the embed variable "value1A" as a participants' response to the first slider in question 1, my thought was that I can just put this in the JS editor:

var value = "${e://Field/value1A}";
this.setChoiceValue(1, value);

And pass it on to the next slider question.

But alas, no dice.

Any ideas?
icon

Best answer by bstrahin 22 June 2018, 14:39

View original

6 replies

Userlevel 7
Badge +38
This is a builtin feature in Qualtrics. If it's not working for you, make sure the two questions are on different screens.
1. On your second slider scale you can go to the question menu to the left with the wheel.
2. Select add default values
3. Click on the drop down arrow
4. Then Survey Question, pick your question and in the list the attribute you want to the default to be equal to

You are using the display piped text option from the Qualtrics Support page - https://www.qualtrics.com/support/survey-platform/survey-module/question-options/add-default-choices/
I don't think that it is built in for sliders; I did get the script to work, however, by turning off mobile-friendly. Seems odd...maybe I am missing something? Maybe it is something with our Uni account?

!
Userlevel 7
Badge +38
Hmmm. I have a university account and it is something I can do. The only thing I can think of is maybe adjusting the zoom on your browser to make sure the drop down isn't out of your visible view. Regardless, I am glad to hear your script is working.

!
Ah, you have to have the "Show value" option selected to do (the cushion between the end of your slider and the drop down was the clue). I don't want my participants to see the underlying values - but I bet in the future, to avoid the JS which can be buggy, I can just set everything up then go through and uncheck the show value option.
Userlevel 5
Badge +13
> @QualtricsCurious said: I don't want my participants to see the underlying values

You could keep the "Show value" option enabled and simply add a CSS statement to set visibility to hidden for the value field. This should hide the value from the participants (unless they are savvy or curious enough to look at the HTML source).
@ QualtricsCurious would you mind posting your code including how you set the embed variable as a participants' response to the first slider? Thanks!

Leave a Reply