Hi
I’m working in the recruitment business.
FOR NOW:
Whenever a user is filling out a form on the apply for job section, the contactperson on that specific job ad gets an email with all the information from the applicant using triggered emails.
HOWEVER … I can’t get it to attach the pdf file the applicant is uploading with their resumé.
Is it even possible to do? if so, can anyone please help
I get an error: “andre and cv is not of type string”
in the dataset they are dokuments
import wixUsers from ‘wix-users’ ;
$w . onReady ( function () {
$w ( '#applyJob' ). collapse ()
. then ( () => {
console . log ( "done!" );
});
$w ( '#button1' ). onClick ( () => {
**if** ( $w ( "#applyJob" ). collapsed ) {
$w ( "#applyJob" ). expand ();
}
**else** {
$w ( "#applyJob" ). collapse ();
}
});
$w ( '#dynamicDataset' ). onReady ( () => {
**let** jobTitle = $w ( '#dynamicDataset' ). getCurrentItem (). title ;
**let** kontaktTlf = $w ( '#dynamicDataset' ). getCurrentItem (). kontaktTelefon ;
console . log ( kontaktTlf );
**if** ( kontaktTlf == <contact number> ){
**let** userID = //UserID for contactperson on the jobad
}
**else if** ( kontaktTlf == <contact number> ){
**let** userID = //UserID for contactperson on the jobad
}
**else if** ( kontaktTlf == <contact number> ){
**let** userID = //UserID for contactperson on the jobad
}
**else if** ( kontaktTlf == <contact number> ){
**let** userID = //UserID for contactperson on the jobad
}
**else if** ( kontaktTlf == <contact number> ){
**let** userID = //UserID for contactperson on the jobad
**else** {
console . log ( "Can't find contactnumber!" )
}
**const** tempUserID = //My user ID for testing
wixUsers . emailUser ( "Jobbank" , tempUserID , {
variables : {
title : jobTitle ,
fornavn : $w ( "#fornavn" ). value ,
efternavn : $w ( "#efternavn" ). value ,
telefon : $w ( "#telefon" ). value ,
andre : $w ( "#andre" ). value ,
cv : $w ( "#cv" ). value ,
motiveret : $w ( "#motiveret" ). value
}
});
});
});