Copying and pasting in Psychpy

Here’s some information on surveys

These slides show how to embed a survey

To retrieve survey data for use in a PsychoPy experiment you need to use .getResponse()

Survey Test code | try it | discussion thread

Surveys can be selected using the Survey ID (so they always run the latest version) of Survey Model File (so they are protected from changes to the online version). The results of each survey are saved to the PsychoPy data file. However, if you want to access the data during your experiment you should use code of the form surveyResponse = surveyComponentName.getResponse() which copies the data into a dictionary.
In this demo I check whether four consent items have been ticked using if len(surveyResponse['consent']) == 4: and then present the second GAD-7 score on screen using surveyResponse['OHQmean']. The order of presentation is counterbalanced using the shelf, in blocks of 20 participants.