- Posts: 10099
- Thank you received: 3589
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
True visual analogue scales in Limesurvey?
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
13 years 1 month ago - 13 years 1 month ago #58174
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic True visual analogue scales in Limesurvey?
Okay, now that I've woken up and re-read the thread, I think I understand - you're only concerned about clicking the slider bar, not dragging the handle.
Add the following to the end of template.css to convert the slider handle to a vertical bar and hide the slider callout (these styles are for the default template). Replace "QQ" with your question ID.
If you want to initially hide the slider handle, set up your survey to use JavaScript and add the following script to the source of the slider question. Again, replace "QQ" with the question ID.
Add the following to the end of template.css to convert the slider handle to a vertical bar and hide the slider callout (these styles are for the default template). Replace "QQ" with your question ID.
Code:
#questionQQ .ui-slider .ui-slider-handle { height:25px; width: 2px; margin-left: 0; top: -8px; background: #79B7E7 none; border: 0 none; } #questionQQ .slider_callout { display: none; }
If you want to initially hide the slider handle, set up your survey to use JavaScript and add the following script to the source of the slider question. Again, replace "QQ" with the question ID.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var qID = QQ; $('#question'+qID+' .ui-slider .ui-slider-handle').hide(); $('#question'+qID+' .ui-slider').live('mouseup', function() { $('#question'+qID+' .ui-slider .ui-slider-handle').show(); }); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 13 years 1 month ago by tpartner.
The following user(s) said Thank You: joshendrikx, Tiepies, jesper_yde, r0bis
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
13 years 1 month ago - 13 years 1 month ago #58175
by DenisChenu
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.
Replied by DenisChenu on topic True visual analogue scales in Limesurvey?
Maybe there are some other possibility:
It's just an idea
PS : again another possibility of jquery plugin with a option select : www.visualjquery.com/rating/rating_redux.html
- Use a single select question ( 10 possibility for example)
- Use a star rating jquery plugin ( code.google.com/p/jquery-star-rating-plugin/ for example)
- Change the css and the image og the star rating to be vertical.
It's just an idea
PS : again another possibility of jquery plugin with a option select : www.visualjquery.com/rating/rating_redux.html
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.
Last edit: 13 years 1 month ago by DenisChenu.
The following user(s) said Thank You: joshendrikx
The topic has been locked.
- joshendrikx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
13 years 1 month ago #58477
by joshendrikx
Replied by joshendrikx on topic True visual analogue scales in Limesurvey?
Thanks Tony, for your help. I really appriciate it! This looks like what I would need. I'll have to find some time to try it out, unfortuneatly my work is killing me at the moment...
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
13 years 1 month ago #58478
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic True visual analogue scales in Limesurvey?
Maybe you can post a link to a demo survey once you are done!?
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- joshendrikx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
12 years 9 months ago #62932
by joshendrikx
Replied by joshendrikx on topic True visual analogue scales in Limesurvey?
Hi Shnoulle,
It's been a long time, sorry for that. I've been very busy with work. Just wanted to thank for your suggestion. I'm not skilled at jquery, so I used the other solution of changing the css file (for me this was difficult enough
Thanks anyway for your help!
It's been a long time, sorry for that. I've been very busy with work. Just wanted to thank for your suggestion. I'm not skilled at jquery, so I used the other solution of changing the css file (for me this was difficult enough
Thanks anyway for your help!
The topic has been locked.
- joshendrikx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
12 years 9 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
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.
- mfino242
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
12 years 7 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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
12 years 7 months ago #65619
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
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.
- pio
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
8 years 3 months ago #129816
by pio
Replied by pio on topic True visual analogue scales in Limesurvey?
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?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 3 months ago #129832
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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.
- pio
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
8 years 3 months ago #129835
by pio
Replied by pio on topic True visual analogue scales in Limesurvey?
wow, that's really cool, thanks a lot! I really appreciate your quick reply!
I'll need to dive into js a little bit
I'll need to dive into js a little bit
The topic has been locked.
- pio
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
8 years 2 months ago - 8 years 2 months ago #131581
by pio
Replied by pio on topic True visual analogue scales in Limesurvey?
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
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
Attachments:
Last edit: 8 years 2 months ago by pio.
The topic has been locked.