Extra, unwanted options popping up for "ranking" #2694
-
Hi all, We are using the "ranking" question type for our survey plugin, and each time when I reorder my answers, extra null options are generated in a multiple of 6*3^n (i.e. 5, 11, 29, 83, 245, 731). This only happened when we put it on Jatos - in fact, the blanks used to disappear. May I know how we can solve this? This is the code where we ask them to enter languages to fill in:
and the following two sections are the ones that require reordering based on the languages input above (that we are having trouble with):
Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @LangDevLab Do you have a link to the JATOS hosted version that I could look at? I'm hoping to be able to do some debugging with the version that's generating issues. |
Beta Was this translation helpful? Give feedback.
-
Hi, I hope you don't mind that I looked into this as I was concerned that there might be a problem with the survey plugin or its interaction with JATOS. I think the problem is in your code that sets up the ranking question here: pages: function() { return [
[
{type: 'html', prompt: header + '<p><b>Language dominance</b></p>'},
{type: 'ranking', prompt: 'Click and drag to rank your languages in order of most dominant (1) to least dominant (5)', options: [lang_list[0], lang_list[1], lang_list[2], lang_list[3], lang_list[4]], name: "langdom"}
]
]} If there are fewer than 5 languages in the I hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi, I hope you don't mind that I looked into this as I was concerned that there might be a problem with the survey plugin or its interaction with JATOS. I think the problem is in your code that sets up the ranking question here:
If there are fewer than 5 languages in the
lang_list
array then you will get "undefined" when trying to index the values that don't ex…