psychopy.org | Reference | Downloads | Github

Saving free recall text on Pavlovia

Hi everyone,

I’m using code from this post https://discourse.psychopy.org/t/writen-response/4676/6 to allow participants to type on the screen freely for 10 minutes in part of my experiment. The text shows up fine, and everything runs smoothly, but in the .csv data file, there is no record of what they typed. I want to save the entirety of what they write.

I have looked at the InputText demo on Pavlovia, and it seems they save their data with a function that specifically ends each trial in which the participant enters text. However, I do not have trials in a loop, but simply 10 minutes of a single screen as my routine. I have tried adding the following code to the “End Routine” custom code, and it doesn’t work. I also tried adding it to the “Each Frame” tab, and it didn’t work.

psychoJS.experiment.addData("wordRecall", typed_recall2.text)

Any ideas how to save their text?
Thanks in advance.

Try putting a loop around that routine, with an nReps of 1. Won’t change your task in any way, but I think a loop is necessary to add data to.

1 Like