The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1

THEMA: show answers options of a question, depending of answer previous selected

show answers options of a question, depending of answer previous selected 6 Monate 1 Woche her #88444

  • MqZ
  • MqZs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
Hello guys,

when you click on an answer, change the question dependent on the answer choices, as shown in the pictures, the fourth image further shows as I do to not display the text of the answer choices, but also want to hide the radio button of the answer choices without text, not to give the possibility of being selected.

IMAGE 1
img1.png


IMAGE 2
img2.png


IMAGE 3
img3.png


IMAGE 4
img_answers.png


code: 01; text EM: {if(G2_Q0004.NAOK>="01","Menos de 2 años","")}
code: 02; text EM: {if(G2_Q0004.NAOK>="02","Entre 2 y 4 años","")}
code: 03; text EM: {if(G2_Q0004.NAOK>="03","Entre 4 y 6 años","")}
code: 04; text EM: {if(G2_Q0004.NAOK>="04","Entre 6 y 8 años","")}
code: 05; text EM: {if(G2_Q0004.NAOK>="05","Entre 8 y 10 años","")}
code: 06; text EM: {if(G2_Q0004.NAOK>="06","Mas de 10 años","")}


this is possible?...

Thanks...
Letzte Änderung: 6 Monate 1 Woche her von MqZ.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: show answers options of a question, depending of answer previous selected 6 Monate 1 Woche her #88446

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2869
  • Dank erhalten: 428
  • Karma: 246
Set up your survey to use JavaScript and add the following script to the source of one of the questions on the page.

The script looks for empty labels in radio questions and, if found, hides the parent option row.
<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
 
		$('.list-radio li.radio-item').each(function(i){
			if($('.answertext', this).text() == '') {
				$(this).hide();
			}
		});
 
	});
 
</script>
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: show answers options of a question, depending of answer previous selected 6 Monate 1 Woche her #88498

  • MqZ
  • MqZs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
I followed all your instructions and it doesn't seem to work, I mean LimeSurvey is not executing that code.

Any hint? :(

imgn1.png
Letzte Änderung: 6 Monate 1 Woche her von MqZ.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: show answers options of a question, depending of answer previous selected 6 Monate 1 Woche her #88499

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2869
  • Dank erhalten: 428
  • Karma: 246
Are there any JavaScript errors? Can you execute a simple alert - docs.limesurvey.org/tiki-index.php?page=..._etc._in_LimeSurvey_?
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
Moderatoren: DenisChenu, ITEd
Ladezeit der Seite: 0.182 Sekunden
Donation Image