Howdy, Stranger!

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

Supported by

[open] Continue only after completion of form

edited May 2013 in OpenSesame

Hi all,

I have a form with 6 rating scales and a continue button. Is it possible to only let the continue button work if participants have filled out all rating scales (and give a message to do so, otherwise?). This should function similar to the consent form, where they can only continue if they have checked the 'accept' box.



  • edited May 2013

    Hi Daniel,

    Did this in the past with a bit of a lame workaround: just keep re-executing the form until a response is given. Maybe a standard feature would be nice: a form_rating_scale with an option to continue only when a response is given.

    from libopensesame import widgets
    exp.set("question1", None)
    exp.set("question2", None)
    exp.set("question3", None)
    while self.get("question1") == u'None' or self.get("question2") == u'None' or self.get("question3") == u'None':
        form = widgets.form(self.experiment, cols=[1,1], rows=[1,1,1,1,1])
        title = widgets.label(form,
            text='Geef aan in hoeverre de volgende stellingen van toepassing zijn op u')
        question1 = widgets.label(form, text='Ik kan moeiteloos een route, die ik nooit eerder heb gelopen, precies teruglopen zoals ik hem heen heb gelopen', center=False)
        question2 = widgets.label(form, text='Als ik me in een gebouw bevind waar ik nooit eerder ben geweest, kan ik moeiteloos wijzen in de richting van de hoofdingang', center=False)
        question3 = widgets.label(form, text='Als ik een herkenningspunt (gebouw, monument, kruispunt) zie dat ik meerdere keren heb gezien, weet ik precies van welke kant ik dat herkenningspunt eerder heb gezien', center=False)
        ratingScale1 = widgets.rating_scale(form, var='question1',
            nodes=['Helemaal wel van toepassing', ' ', ' ', " ", ' ', ' ', 'Helemaal niet van toepassing'])
        ratingScale2 = widgets.rating_scale(form, var='question2',
            nodes=['Helemaal wel van toepassing', ' ', ' ', " ", ' ', ' ', 'Helemaal niet van toepassing'])
        ratingScale3 = widgets.rating_scale(form, var='question3',
            nodes=['Helemaal wel van toepassing', ' ', ' ', " ", ' ', ' ', 'Helemaal niet van toepassing'])
        nextButton = widgets.button(form, text='volgende')
        form.set_widget(title, (0,0), colspan=2)
        form.set_widget(question1, (0,1))
        form.set_widget(question2, (0,2))
        form.set_widget(question3, (0,3))
        form.set_widget(ratingScale1, (1,1))
        form.set_widget(ratingScale2, (1,2))
        form.set_widget(ratingScale3, (1,3))
        form.set_widget(nextButton, (0,4), colspan=2)

    Good luck!


  • edited 9:24PM

    Fyi, Lotje described a slightly different solution a while back, which doesn't require scripting. (Other than that, Edwin's approach works fine as well, of course.)

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

  • edited 9:24PM

    Cool! Thanks for the suggestions! I'll pass it on to the people who are struggling with this

Sign In or Register to comment.