Hello everyone. I have this code for a notification email that works through EmalJS. It works perfectly in my members area so I am notified when they publish something, however, I tried using it in a dashboard page and has an annoying issue I haven’t been able to solve. Two of three of the input values I have connected to the email variables are not working when I send the email because when I receive it they appear empty, but the third (a dropdown) is perfect. As I said it works good in a normal page but not in the dashboard. This inputs are automatically populated when I click one of the properties in a table I want to check. I already double checked I was connecting them correctly. Please let me know if you need more info on this to solve and thank you for your time.
import { sendEmail } from ‘backend/email’ ;
export function button12_click(event) {
$w( '#dataset1' ).onAfterSave(() => {
let myprovider = “gmail” ; //use her the alias you used for this service in emailJS
let mytemplate = “wix_gmail” ; //use her the template name you defined in emailJS
let myparams = {
“from_email” : “my email” ,
“to_email” : “my email” ,
“replyto_email” : “my email” ,
“cc_email” : “another email” ,
“subject” : “Inmueble de Miembro Aprobado” ,
“CAUSA” : “INMUEBLE DE MIEMBRO APROBADO” ,
“ID Miembro” : $w( ‘#input5’ ).value, (ARRIVES EMPTY)
“Titulo Inmueble” : $w( ‘#input2’ ).value, (ARRIVES EMPTY)
“Status” : $w( “#dropdown2” ).value, (WORKS PERFECT)
“LINK VERIFICACION” : “” ,
“from_Name” : “Piensa Transversal Finca Raíz”
};
sendEmail(myprovider, mytemplate, myparams);
})
}