[solved] potential ambiguity in none-responses in text input forms
Hi all,
I have realized a little problem that might occur in text input forms:
In the very unlikely case that a participant actually types the letters 'None' into the text input field, OpenSesame cannot distinguish between this answer and a none-response. Both responses would be saved as type 'unicode' with the content 'None'.
While I think that no participant will ever type 'None' into the response field (it of course depends on the task), it is however not impossible.
Is there any way to avoid this potential problem while still using the form text input or do I need to create my own text input with Python code?
Thanks a lot in advance!

Comments
Hi,
In principle, there is no ambiguity here. The response variable (i.e. the variable indicated in the 'Response variable' field of the
form_text_inputplugin-in or the one specified using thevarkeyword in a custom form) will always be set to whatever was in the text input when the form was exited. If the user doesn't type anything, this will be an empty string, if the user types 'None' it will be 'None', etc. So the value 'None' doesn't have any special meaning here, as it does in akeyboard_response, where it indicates that a timeout occurred.Does that clear things up?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
first, thanks for your fast reply. For some reason in my experiment, if the user does not type anything, 'None' ist saved instead of an empty string. I need to check why that is. Maybe creating a new text input response will fix the issue for my experiment.
Best regards,
Martin
EDIT: I just found out what is causing the issue. It is actually quite tricky. Just before the actual text input form, I am using a keyboard response that does not take any input, but only flushes pending keypresses (I got that nice idea from you some time ago: http://www.cogsci.nl/forum/index.php?p=/discussion/601/solved-how-to-disable-enter-key-before-text-input-form-is-shown#Item_3).
This keyboard response seems to be causing that 'None' is saved instead of "" if nothing is typed. Only if I first type something and then delete what i have typed, an empty string gets stored. If I completely remove the keyboard response item, an empty string is always saved.
UPDATE: I fixed the issue by inserting a Python script between the key flushing keyboard response and the actual text input form. As the keyboard response sets the 'response' variable to 'None', the script simply sets the 'response' variable to "". So if nothing is typed, an empty string gets saved.
Hi Martin,
Yes, that seems like a fine solution. But just to avoid confusion about this, which plug-in are you using exactly? Not the
form_text_inputplug-in right (as I initially assumed)?Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
yes it is the form_text_input that I am using. And i now know that the default output should be an empty string if nothing is typed in. However, the empty keyboard response that only flushes keys immediately before this text input item seems to be setting the default answer to 'None'. This only happens if this keyboard response item exists.
If you are interested in the issue, an colleague and I are implementing the TVA (theory of visual attention) in OpenSesame. You can find the experiment on https://github.com/crsh/combitva. It is not yet ready for dispatch and we will still change some things (e.g., in the experiment, the instructions are still in German), but the experiment is running as it is.
Best regards,
Martin
Hi Martin,
That's pretty cool. I just created a page for standard tasks (see discussion below). I also added yours, basically so that the page doesn't start empty. But feel free to remove it or add a big 'under development' disclaimer if you feel this is premature.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
that is actually a nice thing. I think it is okay without a 'under developement' disclaimer, we just need to translate the instructions soon and maybe expand the readme a bit. Thank you for featuring the project!
Best regards, Martin