Several lines for question in text form
Hello! I am very new to OpenSesame and OSWeb.
I am creating an experiment and I have a survey part at the beginning. I ask questions through text form and I need several lines to do so. I managed to change the code in OpenSesame to allow for several lines of questions, and it is working (I just changed the "set rows"). Here is the script:
set timeout infinite set spacing 10 set rows "1;3;4" set only_render no set margins "50;50;50;50" set form_var income set form_title "Your income" __form_question__ What is approximatively the income per month of your household? (in euros) As a reminder, all data will be kept completly anonymous and confidential. Type a number, then press Enter to continue. __end__ set description "A simple text input form" set cols 1 set _theme gray widget 0 0 1 1 label text="{form_title}" widget 0 1 1 1 label center=no text="{form_question}" widget 0 2 1 1 text_input focus=yes return_accepts=yes stub="" var="{form_var}"
But when I run it with OSWeb, only the first line is visible and the rest is hidden by the answer space:
I don't know how to change it for all the question to be displayed.
I also tried to change the widget dimension at the end for the answer space, but it was not working either.
I would really appreciate any help. Thanks in advance!
Comments
Hi @MelieMeric,
It looks like you're using a form_base, but these are not supported under OSWeb, so I'm a little puzzled by your post. Are you using Open Sesame 4?
Perhaps you can upload a stripped down version of your task with the form?
Best,
Fabrice.
Hi again Fabrice,
Yes I saw that form_base were not compatible with OSWeb, and I checked but I used indeed text_form. I also checked for my version of OpenSesame, it is well the 4 (I downloaded it recently and updated it today again).
I already put my experiment in the other discussion on another point I'm struggling with, but I put it back here again just in case: https://we.tl/t-U3KNbnT0PP
(Same problem, file too heavy, so WeTrasnfer link, sorry)
Best,
Melie
No I believe this is a text_input form, where @MelieMeric adapted the text widget which described what kind of input should be presented.
The problem might be with the spacing of the rows. If you want to have some details on it, you should read the corresponding part of the documentation. You can try to change the relative space that the rows use. set rows "1;3;4" doesn't sound too bad actually, maybe "1;5;4"? Another option would be to add text widgets (for each line of your question).
This being said, it is of course also possible that osweb has issues maintaining proper positioning. It this case, I don't really know what to do. The solution would require fixing stuff in the source code, I'm afraid.
Eduard
Hello Eduard,
Thank you for your answer. Changing the "set rows" solve the problem in OpenSesame, but it doesn't change anything in OSWeb, whatever numbers I put (the question area's size above the response area stays the same).
I didn't manage to create additional widgets either.
But by playing with the font size and shortening some sentences I managed to fit everything. I will do with it.
Thank you both for your help.
Melie
Hi Melie,
Good that you made it work!
@sebastiaan, is this worth a bug report?
Eduard
Thanks for pointing this out! I opened an issue for it.
Check out SigmundAI.eu for our OpenSesame AI assistant!