# Printing the response from a textbox component in a following routine

**URL:** <https://discourse.psychopy.org/t/printing-the-response-from-a-textbox-component-in-a-following-routine/25536>\
**Category:** Builder\
**Tags:** screen, text, textbox\
**Created:** [October 21, 2021, 12:33pm UTC](https://discourse.psychopy.org/t/printing-the-response-from-a-textbox-component-in-a-following-routine/25536 "2021-10-21T12:33:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameron.morin](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cameron.morin](https://discourse.psychopy.org/u/cameron.morin)\
**Post date:** [October 21, 2021, 12:33pm UTC](https://discourse.psychopy.org/t/printing-the-response-from-a-textbox-component-in-a-following-routine/25536/1 "2021-10-21T12:33:31Z")

</div>

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,

Cameron

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [October 21, 2021, 7:48pm UTC](https://discourse.psychopy.org/t/printing-the-response-from-a-textbox-component-in-a-following-routine/25536/2 "2021-10-21T19:48:02Z")

</div>

> [@cameron.morin](#):
>
> $textbox.text

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.

---

<div class="post-metadata">

**Author:** ![cameron.morin](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cameron.morin](https://discourse.psychopy.org/u/cameron.morin)\
**Post date:** [October 22, 2021, 7:51am UTC](https://discourse.psychopy.org/t/printing-the-response-from-a-textbox-component-in-a-following-routine/25536/3 "2021-10-22T07:51:15Z")

</div>

It worked ! thank you very much 🙂
