Hi everyone
I have a form on a dynamic page wich sends out a triggered email to the owner of the dynamic page (The owner of that data row).
But it’s not working…
I tried everything. I haven’t found any article online that could help me.
here’s my code:
import wixUsers from 'wix-users';
import wixData from 'wix-data';
import wixCrm from 'wix-crm';
import wixWindow from 'wix-window';
$w.onReady(function () {
$w("#dynamicDataset").onReady(() => {
let user = '_owner';
$w("#dataset1").onAfterSave( () => {
wixUsers.emailUser('S6gaIKl', user, {
variables: {
fullName: $w("#input4").value,
uur: $w("#timePicker1").value,
klantemail: $w("#input5").value,
date: $w("#datePicker1").value,
info: $w("#textBox2").value,
naamZaak: $w("#input6").value,
}})
.then( () => {
wixWindow.openLightbox("bedankt");
} )
.catch( (err) => {
console.log(err)
$w("#text98").show
} );
});
});
});
I hope you can help me.
Thanks in advance.