Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Array dual scale splitted - range-question-range

Array dual scale splitted - range-question-range 4 years 7 months ago #74944

Hi,

is someone knowing a possibility to design a "array dual scale-question" in the following sence:

scale A - question - Scale B ?

I often saw surveys where questions are designed like this. Must be some java-scripting...

Thanks in advance for answers :)
Last Edit: 4 years 7 months ago by EvaluationKH.
The administrator has disabled public write access.

Array dual scale splitted - range-question-range 4 years 7 months ago #74954

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6305
  • Thank you received: 1407
  • Karma: 546
I did that for someone but can't find the post. 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.
The administrator has disabled public write access.

Aw: Re: Array dual scale splitted - range-question-range 4 years 7 months ago #74957

Do you mean a survey where it is like that, or my limesurvey-survey with the array dual-question?

Sorry - didn't got it...
Last Edit: 4 years 7 months ago by EvaluationKH.
The administrator has disabled public write access.

Aw: Re: Array dual scale splitted - range-question-range 4 years 7 months ago #74960

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6305
  • Thank you received: 1407
  • Karma: 546
Just a sample survey with your array-dual-scale question - so I don't have to spend time creating one to test.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 7 months ago #74964

Oh, sure,

here it is...

Thank you!
Attachments:
The administrator has disabled public write access.

Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 7 months ago #74985

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6305
  • Thank you received: 1407
  • Karma: 546
1) Set up your survey to use JavaScript.

2) Add the following script to the source of the array. Replace "QQ" with the array question ID.

The script hides the first column and inserts the subquestion text into the scale separators.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() { 
 
		moveRowLabels(QQ);
 
		function moveRowLabels(qID) {
 
			// Hide the first column
			$('#question'+qID+' th.header_answer_text, #question'+qID+' th.answertext').hide();
 
			// Insert the subquestion text into the scale separators
			$('#question'+qID+' table.question tbody').each(function(i){
				$('.dual_scale_separator:eq(0)', this).text($('.answertext', this).text());
			});
		}
    });
 
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: FLF

Aw: Re: Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 7 months ago #75098

Thank you so much!

I will try to get a donation for the projekt!

:cheer:
The administrator has disabled public write access.

Aw: Re: Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 1 month ago #84402

How would I just hide the first column only ie. the column that traditionally has the text in it,

or just stop the array from flashing a different colour when you roll over it?
The administrator has disabled public write access.

Aw: Re: Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 1 month ago #84446

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6305
  • Thank you received: 1407
  • Karma: 546
How would I just hide the first column only ie. the column that traditionally has the text in it,
Please attach a screenshot and a sample survey.
or just stop the array from flashing a different colour when you roll over it?
That can be done by modifying template.css but the details would depend on which template you are using. Search for something like "array1:hover".
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Aw: Re: Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 1 month ago #84506

Thanks for the hover tip found it - and could use as a workaround

Question attached and sample survey here

www.ap.urscorp.com/Consultation/index.php?sid=26127&lang=en

just using default template



Interested to hide first column though I tried first half of code above however no luck.
Attachments:
The administrator has disabled public write access.

Array dual scale splitted - range-question-range 4 years 1 month ago #84513

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6305
  • Thank you received: 1407
  • Karma: 546
You can do that with CSS. Add the following to the end of template.css (where 672 is your question ID):
#question672 table.question thead td,
#question672 table.question tbody th {
	display: none;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 4 years 1 month ago by c_schmitz.
The administrator has disabled public write access.
The following user(s) said Thank You: Schroder101

Aw: Re: Aw: Re: Array dual scale splitted - range-question-range 4 years 1 month ago #84585

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6004
  • Thank you received: 370
  • Karma: 260
tpartner wrote:
1) Set up your survey to use JavaScript.

2) Add the following script to the source of the array. Replace "QQ" with the array question ID.

The script hides the first column and inserts the subquestion text into the scale separators.
Is this great solution available at the workarounds? Would be nice because several users will love it.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Time to create page: 0.266 seconds
Imprint                   Privacy policy                  Revocation information and revocation form