Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Text input form for use with JATOS



  • @lmelvill Thank you for your script multichar_response_revised script! I am trying to use the text part for my experiment, but I can't seem to make it work. I have multiple trials defined in the char_lp (each trial with a different stimulus) and i need subjects to be able to type a word while the stimulus is displayed. However, using your script, after I type one letter, the program moves on to the next stimulus. Does anyone know how to fix this problem?

  • Solved it! Thanks!

  • Hi!

    I've tried to use the mulitchar-input and it works very well, however the responses don't appear on the results. How can I correct this? Thanks!

  • Hi @anabatista,

    It's because your task does not contain a logger...

    Add a logger and the data will be saved in the output file. Note that the vars.multichar_response response for each of your questions will also contain "return" as a suffix (because it takes the enter key as part of the subject's input). So, if the subject indicates "id123" as their id in the first question and then hit the enter key, vars.multichar_response will be equal to "d123return". If you don't want that in your output, just use some Javascript right before the logger to remove the last 6 characters:

    vars.multichar_response = vars.multichar_response.substring(0, vars.multichar_response.length-6)

    Hope this helps,


    Buy Me A Coffee

  • Yes, it works! Thank you so much!

  • Hi @anabatista,

    Glad it works!

    One thing I should add to my earlier message: I very recently found out that some keyboards use ENTER and/or RETURN keys, so it may be that the suffix added to the vars.multichar_response variables may not always be "return" (might possibly sometimes be "enter"; which is 5 characters long instead of 6), so perhaps it's best not to edit the vars-multichar_response in Javascript and just let it be (and if needed, get rid of suffix characters in your data set, using some Excel string formula, for example).



    Buy Me A Coffee

  • edited May 2021

    For some reason some attachments got lost in a recent update to the forum. But here it is again, an improved version of multiple-character input for OSWeb

    Hi Sebastiaan,

    Thank you for this! Is there some file to modify the inline JavaScript such that when the user simultaneously presses the 'shift' key + any letter (to make it uppercase), the 'shift' keypress itself is not outputted (i.e. so it only 'prints' out the capital letter)?

  • FabFab
    edited August 2021

    @Karolmou @anabatista @Open_no_no

    Hi there,

    I know this thread is kind of old already but just for your information...

    I think a lot of the problems listed above are solved with OSWeb 1.4, as it now supports the form objects (except the form_base object) and introduces HTML forms through the new inline_html item...

    OSWeb 1.4 can be downloaded on its own but the recommended option is to download the pre released OS 3.3.10:

    This new version will make it a lot easier to take text input (whether a student id number at the beginning of the experiment, some text response in a trial, tick a informed consent box etc.). No need to use loops collecting single keyboard events and append the individual characters anymore.



    If you found my reply helpful and wish to invite me to a coffee, you can do so here 😉:

    Buy Me A Coffee

  • Hi everyone,

    I was using @sebastiaan's code for multichar input response and it worked perfectly fine. For purpose of the new experiment, we need participants to type more than a one word as a single response. So, basically we need some extra inline js coding for the "space" key. I suppose that solution could be similar (but opposite) to the code lines for "backspace" key. At this point, pressing "space" key prints the "space" string on the screen (since it's capturing every key press), so we are having an idea that solution could be switching it somehow to a blank string. Since I'm not very familiar with js programming i would appreciate any help. I hope that maybe somebody already has the solution for this issue.

    Thanks a lot in advance!



  • Hi Uros,

    Have you tried the new built-in Osweb forms? There you can have user text input (also multiple words without having to use hacky solutions. Just use forms the way you would use them in regular Opensesame (and don't forget to update Osweb to 1.4, see Fab's post above).


    Buy Me A Coffee

  • Hi Eduard,

    thank you for the fast response! I've updated the OpenSesame (and OSWeb) to the newest version and tried out the inline_html item. Unfortunately, it doesn't work if I run an experiment in full screen. I'm not sure is it due to some browser settings or anything else? I also tried to make a fully new blank experiment with only this item, and the outcome is the same. Do you have an idea how this could be solved?

    Also, I am not sure which code to use to edit the layout (having the text of a question above the textbox e.g.), when using inline_html. Does anyone possibly have an example of this code, I would really appreciate any help. :)

    Thank you in advance!

  • Hi,

    The htmL_inline is not a form. It provides an interface in which you can run HTML code in your experiment, what you want is the form_text_input. See the attached experiment.


    Buy Me A Coffee

  • edited December 2021

    Hi Eduard,

    thank you very much for the answer!

    Actually, the same problem happens again, when I run your example of an experiment it works only when we use a non-full screen version. Otherwise, textbox and question appears on the screen, but no characters are being written when we type and experiment can't be continued. Have you heard about similar bug before?

    Thanks in advance :)


  • I've tried to use the mulitchar-input and it works very well, however the responses don't appear on the results. How can I correct this? Thanks!.nether portal linking calculator

  • That is weird, @Uros. Running the experiment in the browser shows the input field and accepts input regardless of whether I tick or untick the fullscreen option.

    How exactly are you running the experiment? Which browser are you on? What version of OS and Osweb do you use?


    Buy Me A Coffee

  • Dear @eduard , thank you very much for your answer!

    Unfortunately, I still can't use text input properly :(

    I was trying to run the experiment through "Test experiment in external browser" option and through my JATOS server and the same issue is still happening.

    The browser I am using is Google Chrome (the last update), OS version is the latest, 3.3.10 and OSWEB version is

    You can observe our problem via these JATOS links:

    I would really appreciate if anyone has even a clue why we are having this issue. I've tried this on multiple computers, even reinstalled my OpenSesame and nothing has been changed.

    I suppose that I'm doing something wrong (since other people can run text input on JATOS without this problems, now), but I am not sure what else should I check in order to fix this.

    Thanks so much to everyone in advance, I would very appreciate any help! :)


  • Hi @Uros and @eduard ,

    I think text input is blocked from full screen mode for security reasons. (Is this correct, @sebastiaan ?) So I don't think you're doing anything wrong.



    Did you like my answer? Feel free to Buy Me A Coffee :)

  • I think text input is blocked from full screen mode for security reasons. 

    Yes, that's correct! This issue is tracked here, but there is currently not much that can be done about it, because it's something that is blocked at the level of the browser.

  • Hi @sebastiaan and @lvanderlinden,

    thank you so much for clearing that up!

    I've missed that information. Text input in full screen mode runs without that problem via Mozilla FireFox so that can be the solution of the issue. :)

    Best regards,


  • Hello, I am attempting to design a memory task in which a subject views 15 words & then recalls as many words as they can for each block, over the span of 7 blocks. So far I have been able to do so in the attached task, which is running well on Jatos, however the task has a couple of problems:

    1) The form_text_input does not timeout when running the task using an external browser. I have reviewed the discussions on this forum regarding others experiencing similar issues, but I have not been able to locate a work-around for this issue. I tried incorporating an inline_script item as well to manually time out the task after 30 seconds, which has worked for all of my other tasks, but it was unsuccessful.

    @Fab, I used your code from this discussion:

    2) My second issue, which is my larger concern, is that I would like the form_text_input item to repeat an infinite amount of times, so that the participant enters the target words ONE at a time, rather than just listing them all off. Ideally, this would appear as: form_text_input_1 (target word input), form_text_input_2, (second_target_word_input), and this process continues until 30 seconds has passed OR the participant is done recalling target_words and has done so by indicating a predetermined keypress (such as 'space').

    I have attempted to solve issue 2) by incorporating a sketchpad item so that a multichar_response could be indicated, however I was not able to get this process to work correctly.

    Please let me know if anyone has ideas regarding helpful previous discussions to review, I have not had much luck thus far strategizing.

    Thank you!

  • I was actually able to solve my issue following this thread: review

    The only aspect my task is missing, is a way to incorporate a key press in order to terminate the block loop, in case the participant is done recalling before 15 words.

    Please let me know if you have any ideas regarding how to terminate a block loop using a specific key press. Thanks!

  • Hi @mhilliard2,

    Try setting a condition in the "Break if" parameter of the loop.

    You probably have nested loops and so if you want the task to exit several loops at once, you could perhaps write code to set a stopnow variable to 1 when a a certain key is pressed, and then write


    as the break if parameter of the loops you want to be able to exit.

    Don't forget to set/reset stopnow to 0 where appropriate.

    Hope this helps,


    Buy Me A Coffee

  • Hi @sebastiaan @Uros @eduard @Fab

    Following the issue that using inline_html is blocked from full screen mode, are there now more solutions to solve this besides running via Mozilla FireFox? :)

    We are running a lexical decision task, so running in the full-screen mode could be important and we probably cannot guarantee all participants use FireFox...

    Thanks so much in advance!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games