Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Limit checkbox selection number to 7/14?

Hello, I'm a newbie :smile: , and I've searched and searched, but cannot find script that will help me.

1) I have 14 checkboxes with words, but I want the participant to only be able to select 7. Is there a way to do this? (I used the new_form_base to make checkbox widgets in a 4x4 array, 2 are blank)

2) Also, once the participant selects the 7 checkboxes, I would like to somehow let them be able to restudy these words (along with their fact) in the next phase. So essentially, I would need to get the selected words from the logger I believe.

I know it's a lot of questions in one, but any help is truly appreciated! Thanks in advance!!

Comments

  • RoelofRoelof Posts: 53

    Hi Phojo,

    I think the way to go is to use two inline script items, one to create the form, and one to check your specific requirements. In the attachment an example for 8 items of which 2 have to be chosen, the warning message is now generic, but you could add additional specific warnings to tell the participant if there are too few or too many options selected.

    Right now, in the example the participants can walk sequentially through some sketchpads with text, but I am not sure how or what you want them to inspect.

    perhaps this thread also helps a bit:
    http://forum.cogsci.nl/index.php?p=/discussion/comment/845#Comment_845

    good luck,

    Roelof

  • phojo44phojo44 Posts: 3
    edited August 17

    Hey Roelof,

     Thanks so much for your reply. It is unfortunately imperative that only 7 checkboxes are selected. I thought about a warning message, but even if the experimenter checks that only 7 are selected, for any slight oversight, all of that participant's data would have to be thrown out. 
    

    I tried using "if then" arguments/statements, but it still isn't working. I truly appreciate your comment however, and for trying to help. I'm bummed bc I really like OpenSesame, but I may have to go back to E-Prime. Well anyway, thanks again!

  • phojo44phojo44 Posts: 3

    Whoops, didn't mean for that to happen!

  • RoelofRoelof Posts: 53

    Hi,
    There was indeed a bug in the experiment I uploaded since the number of answers was not reset after checking, which meant that the total number kept going up. If you reset the 'nr_ans' after the else statement (nr_ans = 0) it works. Of course, the example of 2 out of 8 can be rescaled to 7 out of 14 if you set the check length to 7 and add more widgets.

    I am not sure how you want to restrict the options of the participants, there are many possibilities here, I am guessing you would like it to be impossible to select checkbox number 8, or continue immediately after 7 selections, or ...? I have to admit though that customizing the form in this way is not the easiest task, but if you are specific about what you'd like I am sure we can work it out

Sign In or Register to comment.