True visual analogue scales in Limesurvey?

More
6 years 2 months ago - 6 years 2 months ago #58174 by tpartner
tpartner replied the 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.
#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.
<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: 6 years 2 months ago by tpartner.
The following user(s) said Thank You: joshendrikx, Tiepies, jesper_yde

Please Log in to join the conversation.

More
6 years 2 months ago - 6 years 2 months ago #58175 by DenisChenu
DenisChenu replied the 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

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 6 years 2 months ago by DenisChenu.
The following user(s) said Thank You: joshendrikx

Please Log in to join the conversation.

More
6 years 2 months ago #58477 by joshendrikx
joshendrikx replied the 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...

Please Log in to join the conversation.

More
6 years 2 months ago #58478 by Mazi
Mazi replied the 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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 10 months ago #62932 by joshendrikx
joshendrikx replied the 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!

Please Log in to join the conversation.

More
5 years 10 months ago #62933 by joshendrikx
joshendrikx replied the 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

Please Log in to join the conversation.

More
5 years 8 months ago #65617 by mfino242
mfino242 replied the 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.

Please Log in to join the conversation.

More
5 years 8 months ago #65619 by holch
holch replied the topic: True visual analogue scales in Limesurvey?
What do you have in the space for "Slider left/right text separator"?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
1 year 4 months ago #129816 by pio
pio replied the 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?

Please Log in to join the conversation.

More
1 year 4 months ago #129832 by tpartner
tpartner replied the 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)

<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

Please Log in to join the conversation.

More
1 year 4 months ago #129835 by pio
pio replied the 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

Please Log in to join the conversation.

More
1 year 3 months ago - 1 year 3 months ago #131581 by pio
pio replied the 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
Attachments:
Last Edit: 1 year 3 months ago by pio.

Please Log in to join the conversation.

More
1 year 3 months ago #131583 by tpartner
tpartner replied the 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.

Please Log in to join the conversation.

More
1 year 3 months ago #131585 by pio
pio replied the topic: True visual analogue scales in Limesurvey?
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)

Please Log in to join the conversation.

More
1 year 3 months ago - 1 year 3 months ago #131586 by pio
pio replied the topic: True visual analogue scales in Limesurvey?
sorry, just activated it
Attachments:
Last Edit: 1 year 3 months ago by pio.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now