drop down option list

Plus d'informations
il y a 1 mois 4 jours #187756 par kapil_codefire
can we do like this?

I have 5 options for a dropdown list and it's for 5 questions when any option selected that will not come on next question option.

Example:
I have 5 options
1. option 1
2. option 2
3. option 3
4. option 4
5. None

When I first question select 1st option then it's will not come on 2nd question options list, and when 2nd question I select 4th option then next question 1st and 4th option will not come on 3rd question option.

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 1 mois 4 jours #187774 par tpartner
Réponse de tpartner sur le sujet drop down option list
There is no filtering available for list-dropdown questions.

If you use list-radio questions and your questions are in separate groups, you could filter them with hidden multiple-choice questions that you set via Expression Manager.

Searching the forums should yield many examples presented by Joffm on how to do that.

Cheers,
Tony Partner

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

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187775 par kapil_codefire
Réponse de kapil_codefire sur le sujet drop down option list
Hi tpartner, thank you for the answer, can we do this using javascript?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187776 par Joffm
Réponse de Joffm sur le sujet drop down option list
As Tony said: I explained the way I do it several times

Here is an example to do what you described

Fichier attaché :

Nom du fichier : limesurvey...8-19.lss
Taille du ficher :31 ko



But, of course: no drop-down. But I do not think this is a severe issue with only 5 options.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187777 par tpartner
Réponse de tpartner sur le sujet drop down option list

Hi tpartner, thank you for the answer, can we do this using javascript?


Yes, I suppose you could do it with JavaScript.

Are all questions on the same page?

Do you allow backward navigation in the survey?

Cheers,
Tony Partner

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

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187779 par kapil_codefire
Réponse de kapil_codefire sur le sujet drop down option list
Are all questions on the same page?
==>
No, each question on different page

Do you allow backward navigation in the survey?
==>
Yes

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187782 par tpartner
Réponse de tpartner sur le sujet drop down option list
In that case if, for example, you have question codes Q1, Q2, Q3, disable AJAX in the survey theme options and place a script like this in the source of Q2:

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Define the previous answer(s)
		var q1Value = '{Q1}';
 
		// Identify the drop-down
		var thisSelect = $('#question{QID} select.form-control:eq(0)');
 
		// Reset the drop-down if its value equals previous answer(s)
		if(thisSelect.val() == q1Value) {
			if($('option[value=""]', thisSelect).length == 0) {
				$(thisSelect).prepend('<option value="">Please choose...</option>');
			}
 
			thisSelect.val('');
		}
 
		// Remove drop-down option
		$('option[value="'+q1Value+'"]', thisSelect).remove();
	});
</script>

Place a script like this in the source of Q3:

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Define the previous answer(s)
		var q1Value = '{Q1}';
		var q2Value = '{Q2}';
 
		// Identify the drop-down
		var thisSelect = $('#question{QID} select.form-control:eq(0)');
 
		// Reset the drop-down if its value equals previous answer(s)
		if(thisSelect.val() == q1Value || thisSelect.val() == q2Value) {
			if($('option[value=""]', thisSelect).length == 0) {
				$(thisSelect).prepend('<option value="">Please choose...</option>');
			}
 
			thisSelect.val('');
		}
 
		// Remove drop-down options
		$('option[value="'+q1Value+'"]', thisSelect).remove();
		$('option[value="'+q2Value+'"]', thisSelect).remove();
	});
</script>

Sample survey attached:

Fichier attaché :

Nom du fichier : limesurvey...8-19.lss
Taille du ficher :42 ko

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187788 par kapil_codefire
Réponse de kapil_codefire sur le sujet drop down option list
Hi Joffm,

thank you reply, I trying it as you mentioned, but when I click on back button then it's selected option not showing
an example:
Q1. option1 selected
Q2. option2 selected (option1 not showing)
Q3. option4 selected (option1 & option2 not showing)

When I click on back button from Q3 then Q2 option2 not showing.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #187789 par kapil_codefire
Réponse de kapil_codefire sur le sujet drop down option list
Hi Tpartner,
Thank you very much, it's working fine that as I need.

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!