Printing the response from a textbox component in a following routine

I am currently designing an experiment where participants provide a numerical response in a textbox which will need to be displayed in following routines and trials.

From what I understand, I need to store the text of my textbox (something like textbox.text) in a variable component, especially its end routine value, as advised elsewhere by @TParsons. The problem is I do not know where in the variable component I have to specify this. I tried doing it in “Routine start value”, and checking “save Routine end value”. I do not know if that is the right way.

Also, I do not know how exactly to display that text response in a following routine. I tried printing $var1(the name of my variable) in a text component. But I get a blank, grey screen. When I try $var1.text, I crash. And when I try $textbox.text, my screen is blank as well.

From this alone is there anything I’m doing wrong ? If not I can provide some code, although I have tried touching it as little as possible.

All the best,


I think that you need to save the contents in a code components in the EndRoutine tab

e.g. response = textbox.text

Then you should be able to display $response in the following routine.

1 Like

It worked ! thank you very much :slight_smile: