Howdy, Stranger!

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

Supported by

checkboxes for demographic data

Hello everybody,

I'd like to implement some demographic data at the end of my experiment, but something seems to be wrong with my code:

The experiment runs, but doesn't display this inline script. However, I don't get an error message.

Any ideas are appreciated!

Thanks alot!

Best, Lea

Comments

  • I also tried it that way:

    This works fine. But I think checkboxes might be the proper way to do it?

    And I have the same problem as stated above when I try to use the text_input function:

  • Hello,

    I think you are just forgetting to execute your form at the end of the script.
    For instance you could do:

    # init a form
    gender_check = Form(exp, cols = 1, rows = 6, spacing = 10, margins = (100,100,100,100), theme = u'gray')
    # create the objects
    label = Label(text = "blabla")
    
    checkbox1 = Checkbox(text = "check1", group = "group")
    checkbox2 = Checkbox(text = "check2", group = "group")
    checkbox3 = Checkbox(text = "check3", group = "group")
    checkbox4 = Checkbox(text = "check4", group = "group")
    
    button_next = Button(text = "Next")
    
    gender_check.set_widget(label, (0,0))
    gender_check.set_widget(checkbox1, (1,0))
    gender_check.set_widget(checkbox2, (2,0))
    gender_check.set_widget(checkbox3, (3,0))
    gender_check.set_widget(checkbox4, (4,0))
    gender_check.set_widget(button_next, (5,0))
    
    gender_check._exec()
    

    Also be careful with how you set your widgets on the form, because the indices should start at 0 not at 1.
    http://osdoc.cogsci.nl/3.2/manual/forms/custom/

    Best,

    Sylvain

  • Hey Sylvain,

    I only took a screenshot of the preparing phase, but the execution command has been written in the run window.
    However, I changed the script the way you suggested it and now it works.
    So thank you very much! :)

    Best,
    Lea

  • Hey Sylvain,

    it's me again. There's another question that came across and it is somehow related to this topic, so I thought maybe you could help me once again? :)
    My supervisor noticed that clicking the rating scale generates tickmarks, which could infer that one can choose multiple answers. Is there any possibiity to change the tickmarks to, let's say, simple black dots or something similar? That would be great!

    Best,
    Lea

Sign In or Register to comment.