+xHi there,
As part of my University's ethics requirements, participants need to be able to exit a survey and be taken to a debriefing page at any time during an experiment. I have looked at the abort function but cannot work out how to create a button on my page that will allow participants to click and exit to the debriefing page in my survey. Can someone please explain how to create a clickable element that can trigger the abort function?
Thanks!
Sam
There is no way to put an extra button on a <surveypage>. Instead, you'd put an extra question (e.g. a <radiobuttons> or <dropdown> element) on each page where the participant can indicate that s/he wishes to quit. You can then /branch to a debriefing trial and /stop or abort() the experiment. In a nutshell:
<values>
/ stopit = 0
</values>
<block myblock>
/ stop = [
values.stopit == 1;
]
/ trials = [1=pg1; 2=pg2; 3=pg3]
</block>
<surveypage pg1>
/ caption = "Page 1"
/ questions = [1=q1; 2=abort]
/ branch = [
if (dropdown.abort.response == "Abort") surveypage.debrief
]
</surveypage>
<surveypage pg2>
/ caption = "Page 2"
/ questions = [1=q2; 2=abort]
/ branch = [
if (dropdown.abort.response == "Abort") surveypage.debrief
]
</surveypage>
<surveypage pg3>
/ caption = "Page 1"
/ questions = [1=q3; 2=abort]
/ branch = [
if (dropdown.abort.response == "Abort") surveypage.debrief
]
</surveypage>
<radiobuttons q1>
/ caption = "Q1"
/ options = ("A", "B")
</radiobuttons>
<radiobuttons q2>
/ caption = "Q2"
/ options = ("C", "D")
</radiobuttons>
<radiobuttons q3>
/ caption = "Q3"
/ options = ("E", "F")
</radiobuttons>
<dropdown abort>
/ options = ("Keep going", "Abort")
/ defaultresponse = "Keep going"
</dropdown>
<surveypage debrief>
/ ontrialend = [
values.stopit = 1;
]
/ caption = "Debriefing..."
</surveypage>
Hope this helps.