Welcome to the LimeSurvey Community Forum

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

Slider with Text above/below slider points (Pay off matrix)

More
6 years 6 months ago - 6 years 6 months ago #158843 by beton
So I'm wondering if I can replicate something close to the attached picture with LimeSurvey for a scientific study. Do you have any idea what would be best to replicate this?

I suppose I can start with the multiple numeric question/horizontal slider. Should I duplicate the question type and then try to add two fields, where I can enter the text that goes above, and below? Than I would probably need to add some sort of < span >-Element above and below that displays the text in equal distances? Or would it be possible to add some javascript in the question itself that includes the text?

I know some PHP/JavaScript so I wouldn't mind doing this myself, I just need some help/suggestions where to start.
Thank you :)
Attachments:
Last edit: 6 years 6 months ago by beton.
The topic has been locked.
More
6 years 6 months ago - 6 years 6 months ago #158850 by Matadeleo
Are the numbers above/below static or dynamic? and do they need to be shown at all times?

If you only need to show the numbers at each end of the scale permanently, and show the exact number on the slider then maybe you could do something by editing what is shown by the slider callout.
Code:
$(document).ready(function(){
 
  $('.multinum-slider').sliderCallOutText(
 
  {
    text_1 :  '50',
    text_2 :  '54',
    text_3 :  '59',
    text_4 :  '63',
    text_5 :  '68',
    text_6 :  '72',
    text_7 :  '76',
    text_8 :  '81',
    text_9 :  '85',
  });
});

Maybe make a second tooltip callout, orient it to show underneath and feed in the 2nd row of text?

Just trying to offer some ideas, one of the admins/mods tpartner is very good with this kind of thing. Below is the best I could do.. I don't have much skills at JavaScript sorry, just PHP.

Last edit: 6 years 6 months ago by Matadeleo.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #158852 by tpartner
Assuming the numbers are static (defined per question), I have a workaround for exactly this type of question but, unfortunately, I'm on vacation (logged in via phone) so won't be able to offer any code until next week.

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
6 years 6 months ago #158858 by beton
First, thank you both! Yes, the numbers are static, i.e. the same per question. It's not that urgent at the moment (we want to send out the survey by mid October), so if you could send me your workaround, this would be great!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #158954 by tpartner
I have added this to the workarounds section here - manual.limesurvey.org/Workarounds:_Manip...Off_Matrix_Interface




Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, beton
The topic has been locked.
More
6 years 6 months ago #158985 by beton
thank you a lot! this looks great and works perfectly!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose