Welcome to the LimeSurvey Community Forum

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

Rogue X-Scale in Array (Numbers) question

  • LucySheff1
  • LucySheff1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #121540 by LucySheff1
Rogue X-Scale in Array (Numbers) question was created by LucySheff1
I'm currently updating a survey after piloting that will go live tomorrow (! - June 11th) and I added an option to the Y-Scale of an Array (Numbers) question with checkbox layout. It now has 28 subquestions in total on the Y-Scale. When testing the survey a few minutes later I found that the X-Scale now displays twice, once at the top where I want it to and then again after 25 subquestions. It wasn't doing this before, and it looks really unprofessional so I want to get rid of the second X-Scale!

I'm using version 1.92+ build 120919 on an academic secure server in Sheffield, England. I can't see any options to get rid of it, and I've already tried deleting some of the subquestions and adding them back in. I was trying to avoid deleting the whole question and adding it again but I might have to... I hope this is enough information for you to help me.
The topic has been locked.
More
8 years 9 months ago #121542 by steve_81
Replied by steve_81 on topic Rogue X-Scale in Array (Numbers) question
Hi LucySheff1,

no panic. Repeating the headers/scale is a common setting in limesurvey. I'm using 2.05, but it should be similar in your version:

You can change it in global settings somewhere in the tab presentation -> "Repeating headings in array questions every X subquestions". Set this to 0 will never repeat the x-scale.

Otherwise/additionally you can set it for each array question: Edit question -> show advanced setting -> Repeat headers -> writing a 0 will never repeat the-scale for this question.

Cheers
Stefan
The topic has been locked.
  • LucySheff1
  • LucySheff1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #121544 by LucySheff1
Replied by LucySheff1 on topic Rogue X-Scale in Array (Numbers) question
Hi Stefan,

I don't seem to have any of those options - maybe 1.92 is more limited?

I can't find any settings anywhere that refer to repeating headings, or headings in general.

Thanks for the attempt though!

Lucy
The topic has been locked.
More
8 years 9 months ago #121545 by steve_81
Replied by steve_81 on topic Rogue X-Scale in Array (Numbers) question
There is a screenshot of 1.92 in this post:
www.limesurvey.org/en/forum/design-issue...ls-repeat-after-25-r

Seems to me that the option is given.
The topic has been locked.
  • LucySheff1
  • LucySheff1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 9 months ago #121547 by LucySheff1
Replied by LucySheff1 on topic Rogue X-Scale in Array (Numbers) question
The only options I get are the ones below, and I can't get to the global settings... could be to do with the fact that I'm a user on a university system. I'll have to get the department's IT guys to look into it in the morning.

Thanks for your help.
The topic has been locked.
More
8 years 9 months ago - 8 years 9 months ago #121548 by steve_81
Replied by steve_81 on topic Rogue X-Scale in Array (Numbers) question
Okay, I see. Means I see no setting for headers.

Last try, if you can use javascript, otherwise we have to hope, that someone of the experts is still here.

Could you please try adding following javascript in the "source" of the question text (HowTo: manual.limesurvey.org/Workarounds:_Manip....29_in_LimeSurvey.3F ):
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
elems = document.getElementsByClassName('dontread repeat headings')
elems[0].remove();
});
</script>

If you save the question and open the question text with click on source, the script has to be still there. That would be good and means you can use script.

I'm sure that your class name differs, maybe you can provide a link with the survey? Then I can find out, witch class is used.
Last edit: 8 years 9 months ago by steve_81.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #121565 by tpartner
Replied by tpartner on topic Rogue X-Scale in Array (Numbers) question
If you have access to the template, you can add this to the end of template.js:

Code:
$(document).ready(function() {
 
  if($('.array-multi-flexi tr.repeat').length > 0) {
 
    // Add some classes
    $(' tr.repeat').closest('.array-multi-flexi').addClass('with-extra-headers');
 
    // Remove the extra label rows
    $('.with-extra-headers tr.repeat').parent().remove();
 
    // Fix up the array row classes (colours)
    $('.with-extra-headers').each(function(i) {
      $('tr.array1, tr.array2', this).each(function(i) {
        $(this).removeClass('array1 array2');
        if(i % 2 == 0) {
          $(this).addClass('array2');
        }
        else {
          $(this).addClass('array1');
        }
      });
    });
  }
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose