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

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • 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

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • 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

Sign In or Register to comment.