Howdy, Stranger!

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

Supported by

Creating a form that displays new content upon mouse click

Hi,

This might be complicated to do on OpenSesame, but I would greatly appreciate any guidance on how to do it (or whether it's possible at all).

In my experiment, I aim to present a list of True or False statements on single page and have participants click on the statements they want to know the answer to. Specifically this is what I would like to see (the Figure below sort of illustrates what I want to do): When a participant clicks on a statement, the corresponding answer (True or False) appears next to it. And when they click on the answer that just appeared, an explanation appears next to it. As the participant moves on to another statement, I hope the answer and explanation that appeared for the previous statement disappear to make room for new content.

Participants should only click on items they are curious about; they won't need to click on every statement or answer. Ideally, OpenSesame would record which statements or answers participants clicked on.

Thank you so much in advance. I would really appreciate any help.

Comments

  • Hi @ypark133,

    Good news is that this is possible with Opensesame, bad news is, it is not easy.

    You would need to use Python inline_scripting to dynamically adjust the forms that you present. Essentially, first you would have default form (no additional info) with one button per question (toggle more info), and an additional button (proceed to next slide). Once you click the toggle more info button, the form is removed, you process the response in the inline_script (to decide which form to present next), i.e. the form including the response, which is presented right away. The same you do for the form with the additional info.To also make sure that not all the answers need to be shown, you need to additional button.

    You can see an example of complex forms that consist, in fact of multiple forms here: https://osf.io/43jqa/

    The last example is the relevant one.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Hi @eduard,

    Sorry to ask again, but I don't really understand your response. First, when you say "Python inline_scripting," are you referring to this button I captured below?

    Or maybe you are telling me to use this button:


    After reading your response multiple times, I feel like you are suggesting that I create multiple forms like below (1) a form with just the questions, 2) a form with the selected question and the answer, 3) a form with the selected question, the answer, and the explanation), and do some kind of coding to show different forms depending on what the participants click on.

    1) a form with just the questions

    2) a form with the selected question and the answer

    3) a form with the selected question, the answer, and the explanation



    I am not sure if I understood your post correctly though, and I have no idea how to implement it in OpenSesame.

    "You can see an example of complex forms that consist, in fact of multiple forms here: https://osf.io/43jqa/

    The last example is the relevant one."

    → Do you mean that this form below is relevant to me?


    Thank you so much. I really appreciate any help.

    Yoonah

  • Hi Yoonah,

    First, when you say "Python inline_scripting," are you referring to this button I captured below?

    No, neither. I mean. The inline_script item:

    After reading your response multiple times, I feel like you are suggesting that I create multiple forms like below

    Yeah, sort of. There is probably a way to make the form directly with form items, but it is easier (imho) to make such complex directly in Python, hence using the inline_script item. If you are unfamiliar with all this, you should check out the documentation on that.

    → Do you mean that this form below is relevant to me?

    Nope, I mean the last item, called asgm10_solution . What I do there is creating a form in Python, which consists effectively out of three forms (what I call "pages" in the code). Perhaps you can try to run the experiment and experience how to interact with the this specific form. (You can set run_if to False for all the earlier items in the experiment to be able to directly start with the last form.

    Does this clear things up?

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.