Howdy, Stranger!

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

Supported by

Text Input for free recall of multiple words

I am trying to design an experiment where the participants are first shown a list of words and after an interference task, are asked to enter all the words they can recall.
I have used the form_text_input for the free recall part of the experiment. However, I have two issues.
1) I want the participants to enter each word and then press the 'enter' key and then continue with the next word. If the return_accept is set to yes, then the form is terminated then and there. If I set it to no, then after pressing enter, nothing happens. I want to be able to enter multiple responses by pressing enter.
2) After the participant has typed all the words, I want him/her to press a button to exit the form. However, even if I disable the return_accept, only after I press enter, I am able to click the button. It is not activated till enter is pressed.

Comments

  • Hi,

    The first thing that comes to mind is simply to have three form_text_input items in a row, and have each of them accept the response on enter. Does that work, and if not, in what sense doesn't it?

    Cheers,
    Sebastiaan

  • Hi,
    Thanks for responding. I did think about that. But the requirement of this particular experiment is that I give the participants 3 minutes to enter all the words they remember. The number of words will then vary from participant to participant. I cannot arrange a finite number of form_text_input can I? I also need the timeout of 3 minutes. Is that possible?
    So I basically want the participant to start entering the words they can remember and in case they are done before 3 minutes, they can simply press a button to proceed. If they continue to recollect and type, I want the form to end after 3 minutes. Please do let me know if there is any way for me to implement this.
    Thanks a lot

  • Hi Fawkes,

    I agree with Sebastiaan's suggestion. But I would implement it entirely in an inline_script with a while loop. In that inline_script you check how much time has passed since the loop was entered and whether participants pressed a certain exit key. If both are False, you open up a form and let participant type another word. Attached a script does should bring you most of the way.

    Good luck,
    Eduard

    Buy Me A Coffee

  • Hello Eduard,
    This worked perfectly. It was just as I needed. However, is there some way to automatically exit the loop after 3 minutes? Right now it exits only when I type in a word after 3 minutes have passed. This would be of great help. I'll be done with my experiment once this thing is sorted.

    Thanks again for the help,
    Fawkes

  • Yes!
    Just add timeout = <your timeout in milliseconds> to the creation of the form (prepare phase line 5).

    Eduard

    Buy Me A Coffee

  • Hi Eduard,
    The timeout option was already present in the script you shared. My issue is that the form has to close as soon as the specified time is up. However, it does not close. Only when I type in a word and hit the next button, it closes. The form is still open even after the time has passed. So in this case, the last word can be entered even after a long time and the form still accepts this last word before exiting. I hope you understood my issue.
    Thanks
    Fawkes

  • edited May 2018

    Hi,

    No, it wasn't set.

    In the prepare phase, there should be this code:

    var.start_time = clock.time()
    timeout = 180000
    
    def resetForm():
        form = Form(
            cols=[1,1], rows=[1,2,1],
            margins=(50,100,50,100), spacing=25)
    
        text_input = TextInput(
                text=u'>>', frame=True, center=False, stub=u'Type here …',
                return_accepts=False, var=u'response',timeout = 2000) # THIS TIMEOUT KEYWORD IS NEW!
        button = Button(text=u'Next', frame=True, center=True, var=u'response')
        exitbutton = Button(text=u'Done', frame=True, center=True, var=u'exitButton')
    
        form.set_widget(exitbutton, (1, 2))
        form.set_widget(button, (0, 2))
        form.set_widget(text_input, (0, 0))
        return form
    
    

    Can you spot the difference? ;)

    Buy Me A Coffee

  • Hi Eduard,
    I added the keyword like you showed. There is an error message stating that 'timeout' is an unexpected keyword argument.
    Fawkes

  • edited May 2018

    Oh, my bad.

    That was the wrong function, timeout has to be part of form initialization not widget creation.
    That code here should work.

    var.start_time = clock.time()
    timeout = 180000
    
    def resetForm():
        form = Form(
            cols=[1,1], rows=[1,2,1],
            margins=(50,100,50,100), spacing=25,timeout = 2000) # Here it goes
    
        text_input = TextInput(
                text=u'>>', frame=True, center=False, stub=u'Type here …',
                return_accepts=False, var=u'response') 
        button = Button(text=u'Next', frame=True, center=True, var=u'response')
        exitbutton = Button(text=u'Done', frame=True, center=True, var=u'exitButton')
    
        form.set_widget(exitbutton, (1, 2))
        form.set_widget(button, (0, 2))
        form.set_widget(text_input, (0, 0))
        return form
    

    Buy Me A Coffee

  • Yes!! It worked just like I wanted. Thanks a ton for all the help.

  • Can someone provide the full code that implements the initial (@Fawkes) question please?

    Thanks in advance @eduard and @sebastiaan

  • Hi Nomi,

    No unfortunately I dont have the code saved anywhere. And I also don't really remember what it did in detail. Perhaps it is wiser if you describe your problem and maybe we can figure out how to implement it?

    Eduard

    Buy Me A Coffee

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 http://45.77.173.118/ 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