Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Create an Array (Dual) Scale question with more than two scales ?!

More
10 years 2 months ago #121511 by Kingulian
Hello to all my Open Source friends :)

My name is Julien. As a strongly motivated changemaker, I'm nowadays creating a new start-up in the collaborative economy. Today, I would need to make a survey so I could ask few important questions to the future users of this new service.

I'm looking to make things easier and allow respondents to experience a fast survey process.
To do this, I would need to use an Array Scale Question (with dropdown lists) with FOUR scales!!! :ohmy:

Guys, Do you think I have even a small chance to make this happen? If yes, HOW ?

Thank you very much for your time and your collaboration :cheer:

Julien
The topic has been locked.
More
10 years 2 months ago #121520 by tammo
Please post a sketch of how your question would look when on the screen... From what you describe it is a four-dimensional thing on a two-dimensional screen....

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
10 years 2 months ago #121530 by Kingulian
Hello Tammo,

Here are some pictorial examples of what I'm looking to do !

If I could succeed to make something like the example 1 (a four scale array question), it would be wonderful!
Even greater if I could transform the fourth scale into a "text form scale" (example 2).

What do you think ? :)

Julien
The topic has been locked.
More
10 years 2 months ago #121566 by tpartner
You can use JavaScript to insert drop-downs into an array-texts question.

A couple of related threads:
- www.limesurvey.org/en/forum/can-i-do-thi...th-a-dropdown-column
- www.limesurvey.org/en/forum/can-i-do-thi...oxes?start=20#113827

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
10 years 2 months ago #121609 by Kingulian
Thank you very much Tpartner :cheer:

That's great !!!

Only I don't have the skills to make it myself. Where is the tool to code it, and then to "plug it in" ?
I might have to find someone to help me at doing it ...

Thanks again :)

Julien
The topic has been locked.
More
10 years 2 months ago #121861 by Kingulian
Hi all,

That's done :)

So if someone is looking at creating the same array (array with multiple scale, using drop downs), here are the steps to follow :

1) Create a Text Array with multiple columns.

2) Edite the question. Go in the question frame (under the question code), then click on "SOURCE"

3) Add this code :

<script> $(function(){
/** ID du questionnaire **/
var questionIdentifier = '#question17';
/** Options **/
var selectOptions = {
'SQ001': ["---", "OUI", "NON"],
'SQ002': ["---", "min. 1 fois par semaine", "min. 1 fois par mois", "min. 1 par an", "Jamais"],
'SQ003': ["---", "OUI", "NON", "Je ne sais pas"],
'SQ004': ["---", "0,25€", "0,50€", "0,75€", "1,00€", "1,25€", "1,50€", "1,75€", "2,0€", "2,5€", "3,0€", "3,5€", "4,0€", "4,5€", "5,0€", "5,5€", "6,0€", "6,5€", "7,0€", "7,5€", "8,0€", "8,5€", "9,0€", "9,5€", "10€" ]
};

var createSelect = function(key) {

var select = $('<select>');
$.each(selectOptions[key], function (id, value) {
var option = $('<option value="' + value + '">' + value + '</option>');
select.append(option);
});
return select;
};

var getKey = function(name) {

for (var testKey in selectOptions) {
if (name.indexOf('_' + testKey) > -1) {
return testKey;
}
}
return null;
};

$.each($(questionIdentifier).find('.subquestion-list input'), function(index, element){
var input = $(element);
var name = input.attr('name');
if ('text' == input.attr('type')) {
var key = getKey(name);
if (null != key) {
var select = createSelect(key);
input.parent().append(select);
select.val(input.val());
select.change(function(){
input.val(select.val());
});
input.css('display', 'none');
}
}
});
}); </script>

5) Change the red text with
- Right number of the question
- SQ00X ["Dropdown answer proposition1", Dropdown answer proposition2", Dropdown answer proposition3" ...and so on]

6) Then save the question and do a little victory dance :laugh:


Thanks to everyone helping

Cheers and have a good day

Julien
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose