Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : using code from subquestions

using code from subquestions il y a 1 an 4 mois #95230

  • tnegulic
  • Portrait de tnegulic
  • Hors ligne
  • Fresh Lemon
  • Messages : 12
  • Karma: 0
I am using this syntax
{if(O1.NAOK=="Y","- "+O1.question+": "+O1.shown,"")}

{if(O4.NAOK=="Y","- "+O4.question+": "+O4.shown,"")}

{if(O6.NAOK=="Y","- "+O6.question+": "+O6.shown,"")}

{if(O9.NAOK=="Y","- "+O9.question+": "+O9.shown,"")}

for display all answers in YES/No questions where answer is yes.
But, how to use this syntax with subquestions. I have few questions with 10 yes/no subquestions. What code to use? I try with subquestion code but it doesnt work

Tomislav
L'administrateur a désactivé l'accès en écriture pour le public.

using code from subquestions il y a 1 an 4 mois #95255

  • tnegulic
  • Portrait de tnegulic
  • Hors ligne
  • Fresh Lemon
  • Messages : 12
  • Karma: 0
this is not working eather

{if(O2_SQO11=='No',"- "+O2_SQO11.subquestion+": "+O2_SQO11.value,"")}
L'administrateur a désactivé l'accès en écriture pour le public.

using code from subquestions il y a 1 an 4 mois #95260

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 4185
  • Remerciements reçus 785
  • Karma: 359
What question type are the "questions with 10 yes/no subquestions"?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
L'administrateur a désactivé l'accès en écriture pour le public.

using code from subquestions il y a 1 an 4 mois #95290

  • tnegulic
  • Portrait de tnegulic
  • Hors ligne
  • Fresh Lemon
  • Messages : 12
  • Karma: 0
Array type of question with value Yes and No
L'administrateur a désactivé l'accès en écriture pour le public.

using code from subquestions il y a 1 an 4 mois #95291

  • tnegulic
  • Portrait de tnegulic
  • Hors ligne
  • Fresh Lemon
  • Messages : 12
  • Karma: 0
So for better understanding this is example of questions.

Array

In your town is there some of following:

See Yes No
Forrest Yes No
Metro Yes No
etc etc etc

So now i want that if user pick No from any of this subquestion, that question and his answer (No) will show up at the end off questionnaire.
L'administrateur a désactivé l'accès en écriture pour le public.

using code from subquestions il y a 1 an 4 mois #95319

  • tnegulic
  • Portrait de tnegulic
  • Hors ligne
  • Fresh Lemon
  • Messages : 12
  • Karma: 0
Find the solution:
this syntax is working but in 2.0 versions and up..
{if(O2_SQO11=="L002","- "+O2_SQO11.question+": "+O2_SQO11.show,"")}

So if we have question:

O2: In your town is there some of following:
SQO11: See L001 Yes L002 No
SQO12 Metro Yes No
SQO13 Forrest Yes No

and the user for the metro and see clik NO and the end of survey will stand:

Dear user, you said that in your town there is no:

-see:No
-metro:No

I only dont know how to display basic question O2

In your town is there some of following:
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.123 secondes
Donation Image