Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Multiple-turn (longitudinal) survey: previous turn's answers as actual defaults?

More
11 years 3 weeks ago #101667 by awl
Hi,

newbie question: is it possible to have a survey answered multiple times (longitudinal study) while the answers of the previous turn (if existing) are shown as defaults in the actual turn?

In other words, what we want is that the participant will see the same questions again in each turn, with the answer fields/options "preset" with his own respective answers from the last turn, so he can either simply klick the "Next"-button to confirm the old answer(s) again (if nothing has changed), OR optionally "update" the former answers by choosing/entering new ones.

Is this possible and how? Thanks in advance!
The topic has been locked.
More
11 years 2 weeks ago #101821 by awl
.
Was the question clear enough?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 2 weeks ago #101826 by tpartner
If you are creating a new response record, as far as I know, it is not possible to pre-load questions with previous responses.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
11 years 2 weeks ago #101833 by luker
Actually it is similar problem I have asked today in this topic .
You can gather all the old answers in the token list and use those tokens as defaults.
As you can read in my topic, there is no problem in case of text questions, but still don't know how to solve the issue with 'clikable' questions as "multiple choice" or list".
Hope someone could provide the solution valuable for us :-)
The topic has been locked.
More
10 years 10 months ago - 10 years 10 months ago #103742 by jonaskoeppel
For the implementation of a longitudinal design you can just copy the question group and use the expression manager (relevance equation of the group) to show or hide the group according to a condition of your choice (set a hidden field using the assignment operator, don't show before/after a specific date, show/hide depending on a token attribute you can set, etc.). This way you can use one token table and you have all the answers to previous questions available (the group they're in is just hidden).

So you can copy the answers easily using the assignment operator: create a question of the "equation" type at the end of the group which pre-sets the answers of the questions in the same group ({G2Q1 = G1Q1}{G2Q2 = G1Q2} or something like {G2Q3_SQ1 = G1Q3_SQ1}{G2Q4_SQ1 = G1Q4_SQ1} for subquestions like multiple choice boxes ...).

Edit: you might want to set some conditions (if) for the assignment operation or the changed answers will be overritten ...

For this to work you need to set the corresponding token settings in the survey: allow multiple responses ..., Enable response persistence ..., Don't set cookie to prevent repeated participation ... In addition to that you need to set the $deletenonvalues variable in the /application/config/config-defaults.php file to 0, otherwise your previous answers will be deleted.

At least this is the approach I adopting (without the pre-setting of the answers though, so no guarantee for that) and it works pretty fine so far. What I'm not so sure about and what would be interesting are the security issues. Are the questions and answers in a hidden question group written in the source code of the page? Maybe someone of the developpers could answer this question ... :)

Greetings
Last edit: 10 years 10 months ago by jonaskoeppel.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose