I am automating an email from the form on my website and it has worked perfectly thus far. However, I want to make a tweak to the code to only send an email to a member of our team if certain criteria is met. So basically I want to create an if statement that basically says "if drop down 6 = "St. George" , run function "sendEmailToBrandon". I already have everything defined and set up in the backend, I just don't know if this IF statement it set up correctly.
if ($w("#dropdown6".value) === "St. George") { sendEmailToBrandon(subject, body) .then(response => console.log(response)); }
Thoughts??
Thanks!
just run it like this, once you see the console.log confirmation you know it is set up correctly. Then just add the additional code to send your email...
$w.onReady(function () { if ($w('#dropdown6').value === "St. George") { console.log("if statement is set up correctly"); //enter some more code here to execute } })
I’ll watch this thread - I’m sure someone will respond to you. :)
@Brett Haralson (Wix) think you might be able to shed a little light here? :)