how to stop a trial conditional on participants' response


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
jell8ie - Monday, January 30, 2017
Dave - Monday, January 30, 2017
jell8ie - Monday, January 30, 2017
Hi all,

I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.

This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop'
The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.

Here's what I have so far:

<openended codes>
/stimulusframes=[1=codes,input]
/position = (50%, 50%)
/linelength = 40
/numlines = 1
/skip = [values.time > 600000]
/ontrialend = [values.time = values.time + openended.codes.latency]
/ontrialend = [values.input = values.input + 1]
/buttonlabel = "next"
</openended>

Any help would be highly appreciated!


You cannot add and additional button to an <openended> element. What you can do is instruct the participant to e.g. simply type "stop" into the <openended>'s text box and then /stop the block based on that response.

<block myblock>
/ trials = [1 = myopenended]
/ stop = [openended.myopenended.response == "stop"]
</block>

<openended myopenended>
/ stimulusframes = [1=mytext]
/ branch = [openended.myopenended]
</openended>

<text mytext>
/ items = ("Enter something. To quit, type ~"stop~" into the textbox")
/ position = (50%, 40%)
</text>


thanks a lot! good to know its not possible. I previously used to instruct them to type 'stop' - but I work with kids and this turns out too difficult when they have to work independently. Any ideas on other options?

You can run a separate <trial> after each <openended>. That trial could display two response options (clickable <text> elements): One for "next" which would continue the script as usual, one for "stop" which would terminate the <block>. That's about the only alternative I can think of.

jell8ie
jell8ie
Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)
Group: Forum Members
Posts: 5, Visits: 15
Dave - Monday, January 30, 2017
jell8ie - Monday, January 30, 2017
Hi all,

I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.

This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop'
The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.

Here's what I have so far:

<openended codes>
/stimulusframes=[1=codes,input]
/position = (50%, 50%)
/linelength = 40
/numlines = 1
/skip = [values.time > 600000]
/ontrialend = [values.time = values.time + openended.codes.latency]
/ontrialend = [values.input = values.input + 1]
/buttonlabel = "next"
</openended>

Any help would be highly appreciated!


You cannot add and additional button to an <openended> element. What you can do is instruct the participant to e.g. simply type "stop" into the <openended>'s text box and then /stop the block based on that response.

<block myblock>
/ trials = [1 = myopenended]
/ stop = [openended.myopenended.response == "stop"]
</block>

<openended myopenended>
/ stimulusframes = [1=mytext]
/ branch = [openended.myopenended]
</openended>

<text mytext>
/ items = ("Enter something. To quit, type ~"stop~" into the textbox")
/ position = (50%, 40%)
</text>


thanks a lot! good to know its not possible. I previously used to instruct them to type 'stop' - but I work with kids and this turns out too difficult when they have to work independently. Any ideas on other options?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
jell8ie - Monday, January 30, 2017
Hi all,

I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.

This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop'
The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.

Here's what I have so far:

<openended codes>
/stimulusframes=[1=codes,input]
/position = (50%, 50%)
/linelength = 40
/numlines = 1
/skip = [values.time > 600000]
/ontrialend = [values.time = values.time + openended.codes.latency]
/ontrialend = [values.input = values.input + 1]
/buttonlabel = "next"
</openended>

Any help would be highly appreciated!


You cannot add and additional button to an <openended> element. What you can do is instruct the participant to e.g. simply type "stop" into the <openended>'s text box and then /stop the block based on that response.

<block myblock>
/ trials = [1 = myopenended]
/ stop = [openended.myopenended.response == "stop"]
</block>

<openended myopenended>
/ stimulusframes = [1=mytext]
/ branch = [openended.myopenended]
</openended>

<text mytext>
/ items = ("Enter something. To quit, type ~"stop~" into the textbox")
/ position = (50%, 40%)
</text>


Edited 7 Years Ago by Dave
jell8ie
jell8ie
Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)Partner Member (776 reputation)
Group: Forum Members
Posts: 5, Visits: 15
Hi all,

I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.

This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop'
The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.

Here's what I have so far:

<openended codes>
/stimulusframes=[1=codes,input]
/position = (50%, 50%)
/linelength = 40
/numlines = 1
/skip = [values.time > 600000]
/ontrialend = [values.time = values.time + openended.codes.latency]
/ontrialend = [values.input = values.input + 1]
/buttonlabel = "next"
</openended>

Any help would be highly appreciated!


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search