Welcome, Guest
Username: Password: Remember me

TOPIC: Dual Scale Array to Multiple Scale Array Possibility?

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76869

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
I am sorry for not making my requirement list clear the previous time.

Before we get in to the multiple rating questions, I have a multiple choice question that asks the respondent to select the parameters that he is considering.

So, after the parameters are selected (starting from 1 to 10 any number of parameters can be selected from the respondent as it is multiple choice) the parameters are to be listed in the next page where the respondent will be rating it on a scale of 5 for 3 or 4 different parameters.

I have attached a copy of the test survey.

Thanks,
Attachments:
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76871

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4130
  • Thank you received: 763
  • Karma: 347
Have a look at Array exclusion filter - docs.limesurvey.org/Question+type+-+Arra...ray_exclusion_filter
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76872

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Hi,

If I put the question code as suggested in the link, it is hiding all the 10 parameters.

I even tried with a new page, still it hides it all. :(
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76878

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4130
  • Thank you received: 763
  • Karma: 347
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76881

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Sorry Tony its still not working.

it is displaying either all the options if I put the code in Array filter or none of the options if the put the question code in Array filter exclusion.

:(
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76888

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4130
  • Thank you received: 763
  • Karma: 347
You need to use the question code, not the question ID:

Capture222.JPG



Try this survey:

File Attachment:

File Name: limesurvey_survey_452571.lss
File Size: 92 KB
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 5 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: Newbeedu

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76949

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Hi Again,

I am having 2 different matrix on a single page, as in 10 items rated on 3 parameters in one and 10 items rated on 4 other parameters again.

If i put these two question in a same question group, then everything is coming together.

Would it be possible to have it is 2 separate questions?
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76950

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4130
  • Thank you received: 763
  • Karma: 347
Hmm...that's a little trickier. Can you attach a sample survey?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76955

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
I have attached a sample survey.

In page 2 all 7 parameters are listed in one line, where in i want the last 4 to be listed below the second question (like in page 3).

Pls Help.
Attachments:
The administrator has disabled public write access.

Re: Dual Scale Array to Multiple Scale Array Possibility? 2 years 5 months ago #76966

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4130
  • Thank you received: 763
  • Karma: 347
A note before we go any farther: You must not use the "Random answer order" setting for these array questions.

I wrapped everything in a function that you need to call with the start and end question numbers. So, in the case of your sample survey where you want questions 2-4 inline and then questions 6-9 inline, you would call the function twice:
		sideBySide(2, 4);
		sideBySide(6, 9);

The complete code for your survey:
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		sideBySide(2, 4);
		sideBySide(6, 9);
 
		function sideBySide(start, end) {
 
			// Add some temporary classes to the target questions
			$('div[id^="question"]').each(function(i){
				var qNum = i + 1;
				var el = $(this);
				if (qNum >= start && qNum <= end) {
					$(el).addClass('targetQ');
				}
			});
 
			// Wrap the questions in a div
			$('.targetQ').wrapAll('<div class="targetWrapper" />');
			$('.targetWrapper').after('<div style="clear:both" />');
 
			// Add some classes to the questions in the target wrapper
			$('.targetWrapper .targetQ').addClass('inlineQuestion inlineQuestionSub');
			$('.targetWrapper .inlineQuestionSub:first').removeClass('inlineQuestionSub').addClass('inlineQuestionPrime');
 
			// Remove the text from the secondary questions
			$('.targetWrapper .inlineQuestionSub th.answertext').text('');
 
			// Apply some styles (these are for the default template)
			$('.targetWrapper .inlineQuestion').css({ 'float': 'left' });
			$('.targetWrapper .inlineQuestion col, .targetWrapper .inlineQuestion th.answertext').css({ 'width': 'auto' });
			$('.targetWrapper .inlineQuestion .question-wrapper').css({ 'width': '100%' });
			$('.targetWrapper .inlineQuestion td.answer').css({ 'padding': '0.5em 0' });
			$('.targetWrapper .inlineQuestion td.questiontext').css({ 'text-align': 'center' });
 
			// Center the wrapper div
			var wrapperWidth = 0;
			$('.targetWrapper .inlineQuestion').each(function(i){ 
				wrapperWidth = wrapperWidth + $(this).width();
				var padLeft = $('.answertext:eq(0)', this).width() + 3;
				$('.questiontext', this).css({ 'padding-left':padLeft+'px', 'padding-right':'3px' });
			});
			$('.targetWrapper').css({ 'width':wrapperWidth+'px', 'margin': '0 auto' });
 
			// Set the row heights
			var wrapperWidth = 0;
			$('.targetWrapper .inlineQuestionSub').each(function(i){
				$('tbody[id^="javatbd"]', this).each(function(i){ 
					var ansHeight = $('.targetWrapper .inlineQuestionPrime th.answertext:eq('+i+')').innerHeight();
 
					if($.browser.mozilla) {
						$('th.answertext', this).height(ansHeight-1);
					}
					else {
						$('th.answertext', this).innerHeight(ansHeight);
					}
				});
			});
 
			// Remove the temporary classes
			$('.targetQ').removeClass('targetQ');
			$('.targetWrapper').removeClass('targetWrapper');
		}
	});
 
</script>

And the survey with the code in the source of the first array:

File Attachment:

File Name: limesurvey_survey_922322.lss
File Size: 70 KB
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: Newbeedu
Moderators: ITEd
Time to create page: 0.195 seconds
Donation Image