Howdy, Stranger!

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

Supported by

"Back" button on forms

Hi!

I am creating a survey using multiple forms in OpenSesame, and would like to know if there is any way to add a "BACK" button. This would be useful if one participant realizes they made a mistake and would like to go back and select a different option.

Thank you!

Comments

  • Hi Paula,

    The short answer is no. Of course it would be possible to implement a back button using a script, but that would perhaps be more trouble than it's worth. You could consider using a form validator to prevent participants from advancing to the next form unless they've correctly filled out the current form. Would that be an alternative?

    Cheers!

    Sebastiaan

  • Hi Sebastiaan,

    Thank you for the answer. As you suggest, I am trying to use the form validator as an alternative to having a "back" button.

    However, with this approach I am having difficulties inserting images in the forms (if I use the ready-made forms, then I am able to successfully insert images). I get the following error message:

    " widget.set_rect(self.get_rect(index))

    AttributeError: 'Image' object has no attribute 'set_rect' ".


    This is my code:

    >>def my_form_validator():

    >>return var.gender != u'no' 

    >>button_ok = Button(text=u'Next')

    >>label_gender= Label(u'Are you a boy or a girl?')

    >>checkbox_male = Checkbox(text=u'I am a boy', group=u'gender', var=u'gender')

    >>checkbox_female = Checkbox(text=u'I am a girl', group=u'gender', var=u'gender')

    >>image_kids = Image(path=pool['kids.png']) #yes, the image is in the file pool

    >>gender_form = Form(validator=my_form_validator, rows=[1,1,1,1], cols=[1,1])

    >>gender_form.set_widget(label_gender, (0,0), colspan=2)

    >>gender_form.set_widget(checkbox_male, (1,1))

    >>gender_form.set_widget(checkbox_female, (1,2))

    >>gender_form.set_widget(button_ok, (0,3), colspan=2)

    >>gender_form.set_widget(image_kids, (0,1), colspan=2, rowspan=2)

    >>gender_form._exec()


    Any advice you have will be greatly appreciated!


    Best,

    Paula

  • Hi Paula,

    The Image object is a sketchpad element. For forms you need to use the ImageWidget object. See also:

    Cheers,

    Sebastiaan

  • Thank you very much! It works now!!

    Best,

    Paula

  • Hi together,

    I also need a back button in my experiment. I want to present a text which is very long. So I used two form_base items, one as page 1 and one for page two. Now my question is if there is an option that my participants can go back to page 1 (form_base 1) if they want to read the text again. I would be very grateful if anyone could help me or if there is any way to solve my problems.

    Thanks a lot,

    Sabrina

  • Hi Sabrina,

    A direct going-back-button is not implemented and not really possible in Opensesame. However, you might bypass the problem by restarting the first page upon clicking of a certain button. That approach is a bit hacky though and could have annoying consequences depending on your experimental structure. Basically, you have a button on your page 2 that will set a certain variable to True/False, depending on whether it is clicked. If you now put an inline_script right after the form item, in which you check whether the button was pressed, and if so, execute the entire form again. Does that make sense? One potential caveat could be that the responses that were already given might be lost.


    Let me know if you need help implementing this approach.

    Eduard

    Buy Me A Coffee

  • Hallo Eduard,

    thanks for your help. But I think I need help with the implementaion (inline_script). It is not importent that the answers are lost because it is only text that should be read again if necessary.

    And thank you in advance for your help.

    Sabrina

  • Hi Paula,


    This should give you a starting point for implementing your own back button. As long as you keep pressing back on the second form, you'll have to do both forms again. Once you hit anything other than back, the experiment continues.


    Good luck.

    Eduard


    Buy Me A Coffee

  • Thank you very much @eduard

  • Hi together,

    the code from Eduard with the back button for two "pages" works very well (backbutton.osexp). Now I wanted to ask if there is a possibility to extend the code to three "pages", that would help me a lot.

    Best,

    Sabrina

  • Hi Sabrina,

    It is super easy to extend it to three pages. See attached experiment.

    eduard

    Buy Me A Coffee

  • Hi Eduard,

    this is great, thank you very much.

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