I implemented this tutorial https://www.youtube.com/watch?v=0SVvNKNEmWk for the multistage form on this page https://www.klsread.ca/volunteers in order to receive an email notification with the information submitted.
Everything is working except the information from the last slide of the page does not get submitted and I have no idea why!
I used this code:
import {sendEmail, sendEmailWithRecipient} from ‘backend/Volunteers’;
export function button5_click(event) {
$w(“#dataset2”).onAfterSave(sendFormData);
$w(“#text54”).show();
}
function sendFormData() {
const subject = “New Volunteer Registration”;
const body = `Volunteer registration form completed by: ${$w(“#input1”).value}
\rFirst Name: ${$w(“#input1”).value}
\rLast Name: ${$w(“#input2”).value}
\rPhone: ${$w(“#input3”).value}
\rEmail: ${$w(“#input4”).value}
\rAddress: ${$w(“#input5”).value}
\r18 Years of age? ${$w(“#radioGroup1”).value}
\rGender: ${$w(“#radioGroup2”).value}
\rEducation Level: ${$w(“#radioGroup3”).value}
\rCurrent Status: ${$w(“#radioGroup4”).value}
\rMedical Conditions: ${$w(“#input10”).value}
\rWork Experience: ${$w(“#input11”).value}
\rVolunteer Experience: ${$w(“#input12”).value}
\rReference #1
\rFirst Name: ${$w(“#input13”).value}
\rLast Name: ${$w(“#input14”).value}
\rContact Information: ${$w(“#input15”).value}
\rPermission to contact: ${$w(“#radioGroup5”).value}
\rReference #2
\rFirst Name: ${$w("#input16").value}
\rLast Name: ${$w("#input17").value}
\rContact Information: ${$w("#input18").value}
\rPermission to contact: ${$w("#radioGroup6").value}
\rWhat **do** you hope to gain from volunteering?: ${$w("#input19").value}
\rAny relevant interests, skills or talents?: ${$w("#input20").value}
\rVolunteer opportunties: ${$w("#radioGroup7, #radioGroup8").value}
\rEmergency Contact Information
\rFirst Name: ${$w("#input6").value}
\rLast Name: ${$w("#input7").value}
\rContact: ${$w("#input8").value}
\rRelationship: ${$w("#input9").value}
\rWhere did you find out about KL&S?: ${$w("#radioGroup9, #radioGroup11").value}
\rDo you consent **for** KL&S to use to use your photo, image or sound clip **for** promotional and/or publicity purposes?: ${$w("#radioGroup10").value}
\rKingston Literacy & Skills (KL&S) respects your privacy. Read more about how we protect your personal information.`;
const recipient = “dora@opendoormedia.ca”
sendEmail(subject, body)
.then(response => console.log(response));
}
The information gets sent to the database, just not to the email.
Any thoughts?