Thank you so much again, brother!
I’m feeling dumb because now I don’t receiving the email.
What’s wrong with my code, or with me?
Here is my code following your instruction:
$w.onReady(function () {
$w(“#checkbox1”).checked = false;
$w(“#checkbox2”).checked = false;
$w(“#checkbox3”).checked = false;
$w(“#checkbox4”).checked = false;
$w(“#checkbox5”).checked = false;
$w(“#checkbox6”).checked = false;
$w(“#checkbox7”).checked = false;
});
let services = ‘’
if($w(“checkbox1”).checked)
services += “Captação de Imagens”
if($w(“checkbox2”).checked)
services += “Captação de Áudio”
if($w(“checkbox3”).checked)
services += “Iluminação LED”
if($w(“checkbox2”).checked)
services += “Imagens Aéreas”
if($w(“checkbox2”).checked)
services += “Estabilização de Imagens”
if($w(“checkbox2”).checked)
services += “Edição”
if($w(“checkbox2”).checked)
services += “Motion Graphics”
$w.onReady(function () {
//TODO: write your page related code here…
});
import { sendEmail, sendEmailWithRecipient } from ‘backend/email’;
$w.onReady(function () {
$w(“#dataset1”).onAfterSave(sendFormData);
});
function sendFormData() {
const subject = Nova Solicitação de Orçamento de ${$w("#input1").value};
const body = Nova Solicitação de Orçamento de ${$w("#input1").value} \rNome: ${$w("#input1").value} \rEmpresa: ${$w("#input4").value} \rTelefone: ${$w("#input2").value} \rEmail: ${$w("#input3").value} \rObjetivo do Vídeo: ${$w("#textBox1").value} \rReferência: ${$w("#input8").value} \rData: ${$w("#input6").value} \rLocal: ${$w("#input7").value} \rServices: ${$w("#checkbox1").checked} + ${$w("#checkbox2").checked} + ${$w("#checkbox3").checked} + ${$w("#checkbox4").checked} + ${$w("#checkbox5").checked} + ${$w("#checkbox6").checked} + ${$w("#checkbox7").checked} \rDuração aproximada do vídeo: ${$w("#dropdown1").value} \rVídeo Finalizado em: ${$w("#input5").value};
const recipient = $w(“#input3”).value;
sendEmailWithRecipient(subject, body, recipient)
.then(response => console.log(response));
sendEmail(subject, body)
.then(response => console.log(response));
}