Radio list labels based on previous answers

Plus d'informations
il y a 1 mois 3 jours #176371 par EdenResident
EdenResident a créé le sujet : Radio list labels based on previous answers
Hello, I'd like to create a survey that works like this.

A1. Please enter the names of the household members (multiple text input)
Person 1: [Textbox]
Person 2: [Textbox]
Person 3: [Textbox]
...

Person 10: [Textbox]


B1. Please select which HH member you would like to interview (Radio list)
  • Name of person 1 entered from A1
  • Name of person 2 entered from A1
  • ...
  • Name of person 10 entered from A1

Please let me know if this is possible. Thanks.

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

Plus d'informations
il y a 1 mois 3 jours #176382 par jelo
jelo a répondu au sujet : Radio list labels based on previous answers
LimeSurvey is currently lacking answer relevance (multichoice answers are subquestions, which already have sub-question-relevance). You could use a multi-choice question with a answer limit of 1 (which would be the same as a radio button question) instead.

Displaying the entered text in a different question is not the problem.

There might be other workarounds, but the answer-relevance is overdue.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
Les utilisateur(s) suivant ont remercié: EdenResident

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

Plus d'informations
il y a 1 mois 3 jours #176387 par EdenResident
EdenResident a répondu au sujet : Radio list labels based on previous answers
Hi jelo, thanks for the workaround. That works great for me. I have another question if you don't mind.

So after the user selects the member he wants to interview (from the multiple choice), I want to get and store that name. Provided that my variables are coded like this

A1:
PERSON
01 (subquestion)
02
...

B1:
SELECTEDPERSON
01 (subquestion - multiple choice)
02 (subquestion - multiple choice)
..

Then, to get the name of the selected person, I'd assume that the syntax would be like this {PERSON_{SELECTEDPERSON}}

However, the nesting of variables obviously didn't work for me. So, is there like an eval function in Limesurvey?

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

Plus d'informations
il y a 1 mois 3 jours #176391 par jelo
jelo a répondu au sujet : Radio list labels based on previous answers
Start reading from here:
manual.limesurvey.org/Expression_Manager#Access_to_Variables

Implemented functions in ExpressScript (still called Express_Manager):
manual.limesurvey.org/Expression_Manager#Access_to_Functions

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

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

Plus d'informations
il y a 1 mois 3 jours #176394 par tpartner
tpartner a répondu au sujet : Radio list labels based on previous answers
You can use nested IF statements to display the value from the first question. So, given the question and sub-question codes indicated above, something like this (line-breaks inserted for clarity):

{if(!is_empty(SELECTEDPERSON_01), PERSON_01, 
	if(!is_empty(SELECTEDPERSON_02), PERSON_02, 
		if(!is_empty(SELECTEDPERSON_03), PERSON_03, 
			if(!is_empty(SELECTEDPERSON_04), PERSON_04, 
				if(!is_empty(SELECTEDPERSON_05), PERSON_05, '')))))}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Les utilisateur(s) suivant ont remercié: EdenResident

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

Plus d'informations
il y a 1 mois 3 jours - il y a 1 mois 3 jours #176395 par tpartner
tpartner a répondu au sujet : Radio list labels based on previous answers
Regarding using a multiple-choice question with maximum answers of 1 to replicate a radio question, you can insert this script in the question source to automatically uncheck other options as options are checked.

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Listener on the checkboxes
		$('input:checkbox', thisQuestion).on('change', function(e) {
			if($(this).is(':checked')) {
				$('input:checkbox', thisQuestion).not(this).prop('checked', false).trigger('change');
			}
		});
	});
</script>

Here is a small sample survey incorporating both of these concepts:

Fichier attaché :

Nom du fichier : limesurvey...4872.lss
Taille du ficher :23 ko

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Pièces jointes :
Dernière édition: il y a 1 mois 3 jours par tpartner.
Les utilisateur(s) suivant ont remercié: EdenResident

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

Plus d'informations
il y a 1 mois 3 jours #176402 par jelo
jelo a répondu au sujet : Radio list labels based on previous answers
Tony, since I forgot to ask the thread-starter what LS version is in use, we should add that your nice workaround is for LS 3.X.

That answer-relevance is not available in LS3 and LS4 as well, is a pity (or more).

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
Les utilisateur(s) suivant ont remercié: tpartner

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

Plus d'informations
il y a 1 mois 3 jours #176406 par holch
holch a répondu au sujet : Radio list labels based on previous answers
Answer option relevance now!

;-)

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

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

Plus d'informations
il y a 1 mois 2 jours #176451 par EdenResident
EdenResident a répondu au sujet : Radio list labels based on previous answers
Thanks, tpartner. I was able to do that with nested ifs.

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!