0

I need help in autofilling answer in limesurvey.

F/e, I have 2 questions Q1 - exact age, Q2 - age group.

Q1 must be visible for respondents, but Q2 - not.

Q1 "Enter exact age" - is suggesting numeric input. And Q2 should have values from 1 to 3:

  1. Q1 < 20
  2. Q1 == 20
  3. Q1 > 20

How to make Q2 hidden and autofilled, basing on Q1 answer? Besides all Q2 should stay single-choice question.

3 Answers3

1

Use an Equation type question for Q2 with the following equation:

if(Q1 < 20, '1', if(Q1 == 20, '2', '3'))

tpartner
  • 421
  • 2
  • 5
0

To keep Q2 has single choice (for example to be used in quota):

  • Q2 : set to hidden
  • setQ2 : Equation question type with : {Q2=if(Q1 < 20, '1', if(Q1 == 20, '2', '3'))}, set to hidden

This was set only after click next, not in javascript.

Denis Chenu
  • 846
  • 2
  • 7
  • 22