Welcome, Guest
Username: Password: Remember me

TOPIC: set language switch question using .equation

set language switch question using .equation 1 year 1 month ago #97651

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
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."
The administrator has disabled public write access.

set language switch question using .equation 1 year 1 month ago #97654

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6256
  • Thank you received: 799
  • Karma: 239
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
The administrator has disabled public write access.

set language switch question using .equation 1 year 1 month ago #97656

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
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."
The administrator has disabled public write access.

set language switch question using .equation 1 year 1 month ago #97658

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
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."
The administrator has disabled public write access.

set language switch question using .equation 1 year 1 month ago #97663

  • trivender
  • trivender's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 142
  • Thank you received: 6
  • Karma: 6
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."
The administrator has disabled public write access.

set language switch question using .equation 1 year 1 month ago #97670

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6256
  • Thank you received: 799
  • Karma: 239
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.112 seconds
Donation Image