psychopy.org | Reference | Downloads | Github

Text string input field in Builder

I am using PsychoPy3 and am attempting to insert a field where the participants can type responses. I found some really useful script online (https://github.com/jacanterbury/PsychoPy-snippets) which runs perfectly on my laptop. When I copy the code displayed in the ‘code properties box’ into my own experiment, however, it’s not displaying the words I type. Is there an obvious reason for this? Is there more code / and additional box to tick that I’m missing…? There’s no error that shows up and it allows me to go to the next trial without issue.

As well as the code, you need to set the text component to update in response to the variable content on every frame.

Thank you so much for your response, Michael.

I have included a text component with $inputText in the text box of its properties and inputText = “” in the Begin Experiment box of the code. Is this what you mean?

And next to the text field, have you selected that it should update on every frame (i.e. screen refresh)?

I have, yes. Anything else I should be doing…?

Have you checked the following?:

  • Size (the default 0.1 won’t show anything if units is pixel)
  • Colour (black on black?)
  • Position

Jan

1 Like