Problem with mandatory sliders and hidden handles

Mehr
4 Jahre 1 Monat her #120939 von HellaHepp
Hi!

I wanted to include sliders in my survey with hidden handle by default until user clicks on the slider.

Thanks to Tony's solution found here ( www.limesurvey.org/de/forum/can-i-do-thi...ser-clicks-on-slider ) I was able to do so.

Playing with that approach I found a significant drawback which I would love to solve:

1. Just imagine you have a question containing 20 mandatory sliders.
2. A participant answers 19 sliders but accidentally misses a single one.
3. After clicking "Next" the mandatory error message appears (with the page reloaded).
4. Now all sliders are hidden again (even the sliders already answered), so the participant thinks s(he) has to answer all sliders again (which is not the case as the values have been stored).


Any ideas how to circumvent that behaviour, e. g. by
- showing the handles of the sliders already answered or
- hiding those answered sliders completely or
- deactivating the "next"-button until ALL sliders have been answered or
- ...?


Thanks in advance!
Hella

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 1 Monat her #120955 von tpartner
Try this:
	$(document).ready(function() { 
 
		// Initial slider handle states
		$('.ui-slider').each(function(i){
			var thisItem = $(this).closest('.answer-item');
			if($('input.text', thisItem).val() == '') {
				$('.ui-slider-handle', thisItem).hide();
			}
		});
 
		// Listener on the sliders
		$('.ui-slider').mousedown(function(){
			$('.ui-slider-handle', this).show();
		});
	});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: HellaHepp

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 1 Monat her #120960 von HellaHepp
Hi Tony!

I tried your code and... (*drum roll*)... it works! :woohoo:

Thank you so much!

Best regards
Hella

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #123354 von jelo
Is there a working link to the original thread. The search function didn't brought up a hit.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #123359 von holch

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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha