URL of experiment: https://pavlovia.org/Weinbach/text_box999
Description of the problem: I wanted to have an editable text box that allows participants to enter a number and this number is stored. While this works offline in psychopy 2020.2.4, when I upload the experiment online to pavlovia, the editable text is not stored in the data file.
Anyone knows what may be the problem?
Hi @Noam_Weinbach, this is a known bug in v2020.2.4 (hopefully fixed in 2020.2.5!).
The current work around is to put this line in End Routine of a code component:
where ‘myTextBox_txt’ is the name you want for the textbox output variable, and ‘myTextBox’ is the name of your textBox.
Thanks so much for your answer. However, after implementing the code, I don’t see the new variable for some reason.
My text box is named “Text_Number” and this is what I did in the bulider:
I uploaded to Pavlovia and made sure the js file was updated:
However, in the data file, I still don’t see the output_number variable
Try clearing your browser cache & then running again— sometimes even though js changes show up in gitlab, Pavlovia still doesn’t recognize them
Thanks a lot @sawal, that solved it! I would also add for anyone else who tries to do something similar that it is important to add myTextBox._pixi.text = ‘’ after the code you mentioned in end of routine if you want the text to clear from trial to trial.
Happy to help @Noam_Weinbach, cheers!
the runner keeps telling me "NameError: name ‘psychoJS’ is not defined
do I have to put something specific in the psychoJS part?
edit: in the coder I am using both, and when I only used the right side it worked and the text is being saved. Thank you. I don’t know why I didn’t see this post earlier until you shared it on my post.