Welcome to the LimeSurvey Community Forum

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

True visual analogue scales in Limesurvey?

  • joshendrikx
  • joshendrikx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 8 months ago #62933 by joshendrikx
Replied by joshendrikx on topic True visual analogue scales in Limesurvey?
Hi Tony,

I finally had the time to take a look at your suggestions and with some trial and error (I'm totally new to any type of coding) it all work just as I wanted it to. So I really want to thank you again for your help!

Kind regards,

Jos
The topic has been locked.
More
12 years 6 months ago #65617 by mfino242
Replied by mfino242 on topic True visual analogue scales in Limesurvey?
Hi all,

I was trying to put textual anchors into my slider. I tried the suggestion presented earlier however it didn't work. It ended up looking like this

Low|High <
>

instead of

Low <
> High

Any help would be greatly appreciated.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 6 months ago #65619 by holch
Replied by holch on topic True visual analogue scales in Limesurvey?
What do you have in the space for "Slider left/right text separator"?

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.
More
8 years 2 months ago #129816 by pio
tpartner, thank you for your answers.

clicking the slider bar works well...

However I have copied and pasted your java script code.

The slider handle is hidden, but it doesn't show up if I click on the slider..

any ideas?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #129832 by tpartner
Replied by tpartner on topic True visual analogue scales in Limesurvey?
Assuming you do not set an initial value for the sliders, inserting this into the question text will initially hide the handles of all un-moved sliders and then show the handles as the sliders are clicked. (there is no need to replace "{QID}", it will automatically pipe in the question ID)

Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){ 
 
    // Hide slider handles on un-moved sliders
    $('#question{QID} input.text').each(function(i){
      if($(this).val() == '') {
        $(this).closest('li.question-item').find('.ui-slider-handle').hide();
      }
    });
 
    // Click events on the sliders
    $('#question{QID} .ui-slider-1').on('click', function(e) {
      $(this).closest('li.question-item').find('.ui-slider-handle').show();
    });
    });
</script>

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: pio
The topic has been locked.
More
8 years 2 months ago #129835 by pio
wow, that's really cool, thanks a lot! I really appreciate your quick reply!

I'll need to dive into js a little bit
The topic has been locked.
More
8 years 1 month ago - 8 years 1 month ago #131581 by pio
Hello,

I've put an image at each side of the scale and would like the images to be aligned, so that the slider is in the middle (something like valign = "middle"). Any ideas how to accomplish this? (-> attachment)

edit: Would it be possible to do something like this with a scale from 0 to 10? (-> question2.jpg)

thanks,
Piotr
Last edit: 8 years 1 month ago by pio.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #131583 by tpartner
Replied by tpartner on topic True visual analogue scales in Limesurvey?
Can you activate a test survey so we can see that source?

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
8 years 1 month ago #131585 by pio
yes, sure:
delphi.kli.psy.rub.de/limesurvey/index.p...722?lang=de-informal

(javascript doesn't work, because the administrator of our server didn't swith on js in limesurvey)
The topic has been locked.
More
8 years 1 month ago - 8 years 1 month ago #131586 by pio
sorry, just activated it
Last edit: 8 years 1 month ago by pio.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #131617 by tpartner
Replied by tpartner on topic True visual analogue scales in Limesurvey?
Add something like this to template.css. You will need to modify "46926" to match the question ID in your live survey.

Code:
#question46926 label.slider-label {
    padding-top: 50px;
    padding-right: 50px;
}
 
#question46926 div.multinum-slider {
    margin: 80px 20px 0 20px;
}


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
8 years 1 month ago #131649 by pio
thank you very much!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose