Welcome to the LimeSurvey Community Forum

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

Slider questions with two times the same values

  • KompetenzZ
  • KompetenzZ's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 3 months ago - 7 years 3 months ago #147259 by KompetenzZ
I want to do a slider question with an description of the scale above the question.
Is this possible to use the same values two times? I don't want to use negative values, e.g. -9 to +9, on one side.
Something like this. I placed the words price and availability next to the scales, but I don't know how I can place the description above the scale (extremly important........equal imp........extremly important)

What is more important?

.....extremly important.......equal imp.........extremly important
................9...............................1...............................9
........price |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| availability


Thank you in advance

Cheers kompetenzz
Last edit: 7 years 3 months ago by KompetenzZ.
The topic has been locked.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #147260 by holch
For the visible scale it should be no problem to use the same values (but "1" as the middles seems to be rather strange).

However, for the answer code you will probably have to use a different value, because how will you know on which side this number was marked?

Placing the description above the scale can be done quick and dirty by using html tags like line breaks
Code:
<br/>
. But there should also be examples on how to have another table row in this forum. Probably posted by tpartner.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago - 7 years 3 months ago #147267 by tpartner

Is this possible to use the same values two times?

If you are using LimeSurvey version 2.5.x and you want to show absolute values in the slider tooltip (callout)...

1) Set up your survey to use JavaScript

2) Give the slider question a positive number (9) for the maximum and a negative number (-9) for minimum

3) Hide the tip in the slider question via advanced settings

4) Add this script to the question source

Code:
<script type="text/javascript" charset="utf-8">    
 
  $(document).ready(function() {
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Insert a fake tooltip (callout)    
    setTimeout(function() {
      $('.answer-item', thisQuestion).each(function(i) {
        var thisValue = $('input[type="text"]', this).val();
        $('.tooltip-inner', this).hide().after('<div class="tooltip-inner fake" />');
        $('.tooltip-inner.fake', this).text(Math.abs(thisValue));
      });
    }, 100);
 
    // Listener on sliders    
    $('input[type="text"]', thisQuestion).on('slide slideStop', function(event, ui) {
      var thisValue = $(this).val();
      $(this).closest('.answer-item').find('.tooltip-inner.fake').text(Math.abs(thisValue));
    });
  });
</script>


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 3 months ago by tpartner.
The topic has been locked.
  • KompetenzZ
  • KompetenzZ's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 3 months ago - 7 years 3 months ago #147307 by KompetenzZ
Replied by KompetenzZ on topic Slider questions with two times the same values
Thank you very much for your answers, I added the script to the question source :)
Attached are two files: Once, a picture how about the questionnaire should look like, things that I didn't accomplish yet are market with a rectangle. Second, my question so far, I have following problems in my question:

1. For placing the description above the scale ("extremely important/equal/extremely important") I used the html tags from holch "<br/>" to set the description in the right line, but how can I place space between the description? Pressing the space bar doesn’t work (see also attachment2).

2. The slider scale should range from 9 to 9 without 0 (zero): 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 These are 17 nuances. Such a scale is required for the questionnaire because of the method (Analytical Hierarchy Process), it has mainly mathematical reasons of the method why there shouldn't be a 0 (zero) in the middle. Currently, the slider question has two times the same value (which is good), but the middle value is 0 (zero).

3. Holch wrote: "for the answer code you will probably have to use a different value, because how will you know on which side this number was marked?" That’s an excellent comment, how can I do this? Sorry I am a beginner...

4. There is pretty much space between the subquestions in attchment2 (vertically). Could I reduce the space somehow?

drying rate<
>water holding capacity
(less space)
drying rate<
>price

Thank you

Cheers kompetenzz
Last edit: 7 years 3 months ago by KompetenzZ.
The topic has been locked.
  • KompetenzZ
  • KompetenzZ's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 3 months ago - 7 years 3 months ago #147363 by KompetenzZ
Replied by KompetenzZ on topic Slider questions with two times the same values
here is a picture of my question.
I try to use "&nbsp" or &#160 to add spaces, but isn't there a easier method to add space between the description above the slider?
I also found this but I don't know where to insert it

/* Remove excess white-space */
#navigator-container {
margin-top: 0;
padding-top: 0;
}
.save-all hr {
margin: 0;
}

Cheers kompetenzz
Attachments:
Last edit: 7 years 3 months ago by KompetenzZ. Reason: description
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #147394 by tpartner

The slider scale should range from 9 to 9 without 0 (zero): 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 These are 17 nuances. Such a scale is required for the questionnaire because of the method (Analytical Hierarchy Process), it has mainly mathematical reasons of the method why there shouldn't be a 0 (zero) in the middle. Currently, the slider question has two times the same value (which is good), but the middle value is 0 (zero)

As far as I know, that's not possible with a slider. You will need to recode the data in post-survey analysis.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 3 months ago #147448 by DenisChenu
Replied by DenisChenu on topic Slider questions with two times the same values
You can show a different number, but number in DB must be different, else you have no difference between each choice.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • KompetenzZ
  • KompetenzZ's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 3 months ago - 7 years 3 months ago #147456 by KompetenzZ
Replied by KompetenzZ on topic Slider questions with two times the same values
Thank you, I used &&##160;

to layout the scale description above the slider to the right postition.
I hope the browsers don't have troubles with the line break.

Cheers kompetenzz
Last edit: 7 years 3 months ago by KompetenzZ.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose