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

SUJET : set language switch question using .equation

set language switch question using .equation il y a 9 mois 2 semaines #97651

  • trivender
  • Portrait de trivender
  • Hors ligne
  • Expert Lime
  • Messages : 118
  • Remerciements reçus 3
  • Karma: 4
Q1 is "List(radio)" question with five answer options,Q2 is "Equation type" question and Q3 is "Language switch" question with two languages 1:Hindi and 2:English.I will hide both Equation and "Language switch" question.I want to set Hindi if respondent select 2nd radio button at Q1 and set English if respondent select 5th radio button at Q1. I think we can do it by using some equation in Equation type question .I am new to EM so please tell me what would be the equation to do this.
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
L'administrateur a désactivé l'accès en écriture pour le public.

set language switch question using .equation il y a 9 mois 2 semaines #97654

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 5838
  • Remerciements reçus 714
  • Karma: 222
Hello,

EM can set existing answers but only for next page (not in javascript)
With equation question type, try:
{Q3=if(Q1.NAOK=="A2","in",if(Q1.NAOK=="A5","en",""))}

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

set language switch question using .equation il y a 9 mois 2 semaines #97656

  • trivender
  • Portrait de trivender
  • Hors ligne
  • Expert Lime
  • Messages : 118
  • Remerciements reçus 3
  • Karma: 4
Denis you are super helpful.. I am so happy its is working perfectly..now I got the idea how do we write Equations.
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
L'administrateur a désactivé l'accès en écriture pour le public.

set language switch question using .equation il y a 9 mois 2 semaines #97658

  • trivender
  • Portrait de trivender
  • Hors ligne
  • Expert Lime
  • Messages : 118
  • Remerciements reçus 3
  • Karma: 4
I am able to set the Q3(language question) based on selection on Q1.But things didnt show up as expected.Suppose I start survey with Hindi language and select 5th radio button at Q1 then Q3(language question) gets automaticlly set to English.But still the survey continue in Hindi :(.I guess that the mannual selection on language on Q3 triggers somthing that change survey language for rest of the survey.I dont want respondent to see language dropdown question and the survey language should be dependent on Q1.
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
L'administrateur a désactivé l'accès en écriture pour le public.

set language switch question using .equation il y a 9 mois 2 semaines #97663

  • trivender
  • Portrait de trivender
  • Hors ligne
  • Expert Lime
  • Messages : 118
  • Remerciements reçus 3
  • Karma: 4
I did it using javascript.will share code tomrrow..:)..if there is any other better way plz let me know..
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
L'administrateur a désactivé l'accès en écriture pour le public.

set language switch question using .equation il y a 9 mois 2 semaines #97670

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 5838
  • Remerciements reçus 714
  • Karma: 222
Oh yes,

You're right ....

Think need a $_POST something, but theni you can have a look at "langage changer"JavaScript : sending a $_POST can be OK.

Have to look again.
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.134 secondes
Donation Image