psychopy.org | Reference | Downloads | Github

Problem with textbox not allowing participant to move on to the next question in a questionnaire

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Windows 10
PsychoPy version (e.g. 1.84.x): 2021.1.4
Standard Standalone? (y/n) If not then what?: Yes
What are you trying to achieve?:

I have a coded experiment that shows 48 words one after another. After the words are shown, there is a questionnaire at the end that shows five questions that ask about the words the participant just saw. Each question is a Yes or No (‘y’ and ‘n’ letter response), but if answered ‘Yes’, a textbox will then appear in which the participant is supposed to type a word(s) that correlate to what the question is asking (eg, did you see any patterns in the words you were shown? If so, type them below)


(Builder view; part 1 of the questionnaire where only the question is shown.)


(Builder view; part 2 of the questionnaire, where the textbox appears)

What did you try to make it work?:
So the questionnaire works smoothly but there is a hitch that happens. When the participant is done typing in the textbox, they are supposed to hit the ‘return/enter’ button for the code to move on to the next question. However, sometimes the code will get physically stuck and only then indent the line of text in the textbox. It just refuses to move on to the next question, so you have to exit out and restart the code.

What specifically went wrong when you tried that?:
There is no specific error message that is thrown. It is just a glitch of some sort. My best guess is that it is because of the button I am using. My professor (for who I am developing this code) would like to keep the ‘return’ button to move between the questions. However, I think this is causing problems for the code sometimes, resulting in my error.

I am attaching the Builder file, Python code, and the Excel files used for this code. The Python version of the code has a few adjustments compared to the Builder version, but is very similar.

Testing_Questionnaire.psyexp (40.7 KB)
Testing_Questionnaire.py (40.2 KB)
Testing_Questionnaire.xlsx (10.5 KB)
TestingWords_1.xlsx (9.3 KB)

Thank you in advance for any advice you may have!