I am seeking support in developing a survey that is accessible for three parties to complete three different sets of questions. Essentially, I am trying to develop one survey that can be sent for 2-3 individuals to provide answers to assigned sections.
I would need the survey to stay active until all parties complete their section, which means a retake link cannot be used due to the survey being marked as incomplete before being sent to the next person.
I was able to create a survey where at the end of each section JavaScript was embedded so the forward arrows would not show. This would prevent the survey participant from moving forward and completing a section that was not meant to be completed by them. I then created a custom URL using the survey ID number and would like to forward that in an email to the next party. I linked the specific URL to the specific section created for the receiving participant.
The challenge I am now having is writing the JavaScript code to be linked to a question/page so that once that question/page is displayed, it will prompt the email to be sent to the next party. I have provided the JavaScript code that I tried below. However, there must be an error in that code because I cannot get it to prompt the email.
Code:
Qualtrics.SurveyEngine.addOnUnload(function() {
Email.send({
SecureToken: "mail-relay.iu.edu",
To: "${q://QID8/ChoiceTextEntryValue/5}",
From: carserv@iuk.edu,
Subject: "Thank you for participating",
Body: "Thank you for taking our survey. https://iu.co1.qualtrics.com/jfe/form/SV_0ebVabPJUIDfQz4?Faculty=${rm://Field/ResponseID}",