set language switch question using .equation

More
4 years 5 months ago #97651 by first
first created the topic: set language switch question using .equation
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.

Survey Designer and Programmer

Please Log in to join the conversation.

More
4 years 5 months ago #97654 by DenisChenu
DenisChenu replied the topic: set language switch question using .equation
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

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
4 years 5 months ago #97656 by first
first replied the topic: set language switch question using .equation
Denis you are super helpful.. I am so happy its is working perfectly..now I got the idea how do we write Equations.

Survey Designer and Programmer

Please Log in to join the conversation.

More
4 years 5 months ago #97658 by first
first replied the topic: set language switch question using .equation
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.

Survey Designer and Programmer

Please Log in to join the conversation.

More
4 years 5 months ago #97663 by first
first replied the topic: set language switch question using .equation
I did it using javascript.will share code tomrrow..:)..if there is any other better way plz let me know..

Survey Designer and Programmer

Please Log in to join the conversation.

More
4 years 5 months ago #97670 by DenisChenu
DenisChenu replied the topic: set language switch question using .equation
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.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!