Adding a "none" answer choice after pulling answers forward from previous question | XM Community
Solved

Adding a "none" answer choice after pulling answers forward from previous question


I would like to pull the selected answers forward from a previous question and in the new question add an exclusive "none of these" answer to the pulled forward list. Help?
icon

Best answer by Anonymous 9 August 2018, 23:44

View original

19 replies

Hello @S_Bowen0425 ,

First add "none" option to your new question(and make it exclusive) and then select the carry forward option for that question.
If you want "none" as the last option then in question randomization option make the arrangement of option as shown in the image by selection none option and then using up and down option!

In survey tab it will show as first option but in preview it("none") will be always the last option.
Excellent, detailed, clear answer. Thank you!
Userlevel 6
Badge +21
> @Shashi said:
> Hello @S_Bowen0425 ,
>
> First add "none" option to your new question(and make it exclusive) and then select the carry forward option for that question.
> If you want "none" as the last option then in question randomization option make the arrangement of option as shown in the image by selection none option and then using up and down option!
>
> In survey tab it will show as first option but in preview it("none") will be always the last option.
>

@Shashi great one.

Hi @S_Bowen0425 I like to suggest another way in which you have to use display logic in answer options.
Copy all previous question options in new question and then add 'none of these' in last option.
Add display logic in each option (that: display if selected in previous question) respect to previous question options.
Add make exclusive in 'none of these'
Thank you.
Userlevel 7
Badge +27
There is one caveat to this - If you need to carryover the randomized order of the selected options to the second question, you can't use Advanced Randomization to move None to the bottom because you will lose the carryover randomization order. In that case, you can use JavaScript to move None to the bottom.
Good point. Thanks.
It looks like this issue arises with some regularity. Any chance somebody can share a snippet of JavaScript that would to move this top "None" option to the bottom as Tom suggests? TIA
Badge +1
Can anyone point me to where this question might have been answered? (How to add "none" to the bottom of carry-forwarded statements, keeping randomization the same?) Thank you!
Userlevel 7
Badge +27
Add "none" as an answer option (in addition to the carryover options). Then:
```
Qualtrics.SurveyEngine.addOnload(function() {
var choices = jQuery("#"+this.questionId+" li.Selection");
choices.last().after(choices.first());
});
```
Badge

Great suggestion, TomG; very helpful. What if there are two answer options that need to be moved below the carryover options (e.g., a "None" option and I "I don't know" option)? How could both of these options be added to the carryover options? Could you demonstrate how your code from Sep '19 (which I've pasted below) could be modified to enable this? Any input is much appreciated!
Qualtrics.SurveyEngine.addOnload(function() {
var choices = jQuery("#"+this.questionId+" li.Selection");
choices.last().after(choices.first());
});

Badge

In the event anyone has a similar question as the one I previously posted, and building on TomG's helpful comment, here's a crude approach that enabled three answer options to be moved *below* the carry-forward options (e.g., in my case, it was a carry-forward brand list that needed to be followed by "A generic brand," "None of these," and "I don't know."
Qualtrics.SurveyEngine.addOnload(function() {
var choices = jQuery("#"+this.questionId+" li.Selection");
choices.last().after(choices.first());
var choices2 = jQuery("#"+this.questionId+" li.Selection");
    choices2.last().after(choices2.first());
    var choices3 = jQuery("#"+this.questionId+" li.Selection");
    choices3.last().after(choices3.first());
});


Userlevel 7
Badge +27

kbot ,
A more flexible approach that works with any number of "new" choices:
var q = jQuery("#"+this.questionId);
var lastChoice = q.find('li.Selection:last');
var newChoices = q.find('li.Selection > input:not([choiceid^=x])').closest('li.Selection');
newChoices.each(function(index) {
lastChoice.after(this);
lastChoice = jQuery(this); //new last choice
});

Badge

I have a similar question. I was able to use the code to add the "none of these" option to the bottom of carry forward-selected choices, but, I am also interested in carrying forward unselected choices, or, displayed choices. It didn't seem to be working for me when I used those carry forward selections. Is there an easy edit to the above javascript that can accomplish this?

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/27761#Comment_27761It works the same way with unselected or displayed, but if you have a 'none' option on the orginal you may need to look for and hide it if it is visible on the carryover.
Are you using carryforward on the carryforward? If so, the choice ids start with xx, so you need to adjust the selector accordingly.

Badge

https://www.qualtrics.com/community/discussion/comment/27764#Comment_27764yes, it is a carryforward from a carryforward so that's probably why it's not working! I'm not very familiar with javascript so i don't know where i would change the selector. Any way you can help?

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/27766#Comment_27766It is in the code above, in input:not([choiceid^=x]) change x to xx

Badge

https://www.qualtrics.com/community/discussion/comment/27767#Comment_27767awesome, thank you! this works, for a vertical multiple response question , but I am trying to use a MR question with columns. Is that not possible?

Userlevel 7
Badge +27

Correct, it only works on a vertical MC. Due to how Qualtrics formats columns, it would get very complicated to try to do it on a MC with columns.
I never use the Qualtrics columns option. I have a proprietary script that converts a vertical MC to responsive columns.

Badge +1

The way that I did it is the same but with None on the left and the randomised options in the top right box.
Screenshot 2022-05-20 at 14.49.43.png
Screenshot 2022-05-20 at 14.50.57.pngScreenshot 2022-05-20 at 14.51.39.png

Leave a Reply