#1 by mmz1311
Hello everybody, i am a beginner with otree studio and currently i am implementing an experiment with three apps using tree studio: first a survey, than a trust game and than again the survey where the participants get the opportunity to adjust their answers because they get the information that answering in a certain way increases their chance of winning in a lottery. How can i implement the last step? So show participants again the same survey like in the first step, with their given answers and the opportunity to adjust? I would really appreciate any help. Thank you guys.
#2 by Fanist
For a simple approach, I would suggest storing your answers in Participant field in the first survey app. Let's say several answers of the selected variables form a list ['answer1', 'answer2', 3], make it into a string and store it in player.participant.answers Then in the final survey app, get the answers from Participant field, and then show them in the survey interface. Tell the participants that if they want to change the answers, they can choose again. However, if they do not want to change the default answers, just skip the questions (see blank=true to enable the questions to allow null answers).
#3 by mmz1311
Thank you for your help Fanist. How and where do I form the list and make it into a string? Sorry but I am pretty new with otree.
#4 by Fanist
Well, I have written a minimal demo for you, see https://github.com/Fanisting/otree-demo The Participant field is stored at demo/settings.py, and in the list PARTICIPANT_FIELDS When you want to access it, write player.participant.answers to get it. And I used json package to store a list as a string. Hope that helps!
#5 by mmz1311
Thanks Fanist, I really appreciate your effort. I will try it the way you described it. Best regards!
#6 by mmz1311
Hello Fanist, thank you again, i tried it and i think it works for me. Is there ay possibility to show the answers of the first survey directly at each question of the second survey? (f.e. second Survey questions one, you can see answer one of survey one, maybe after the question, e.g. this way: What is your gender? (Male) - so the answer in survey one would be the part in brackets) Thank you in advance!
#7 by Fanist
If you wanna do that, I would recommend use the raw-html-widgets, where you can generate the question text as you want. Let's say you store 'answer1' in app1 and the participant field, and now in app2, you should get the value and generate a string like ``` question = "Your answer in app1 is: " + str(player.participant.answer) + "Now..." ``` check how to use it at https://otree.readthedocs.io/en/latest/forms.html#raw-html-widgets