As of PsychoPy 2023.1.1, surveys can be embedded in online PsychoPy experiments, which gives a step change in the level of functionality available.
I’ve just made my survey test public so you can try it and fork it.
Survey Test code | try it
Surveys can be selected using the Survey ID (so they always run the latest version) of Survey Model File (so they 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 my demo I check whether four consent items have been ticked using if len(surveyResponse['consent']) == 4:
and then present the mean happiness score on screen using surveyResponse['OHQmean']