Hi, Seniours. Please guide me, I am unable to send “Form Submission” after following all process like SendGrid-API Key, Email.jsw, and SendGrid.js
Here is my Code, Please tell me where I make the errors. Thanks
import {sendEmail} from ‘backend/email’ ;
$w.onReady( function () {
$w( “#dataset1” ).onAfterSave(sendFormData);
});
function sendFormData() {
const subject = **from** New Client Request **from** Website ${$w( "#input1" ).value}
;
const body = Name: ${$w( "#input1" ).value} \rMobile: ${$w( "#input4" ).value} \rE-mail: ${$w( "#input5" ).value} \rComments: ${$w( "#textBox1" ).value}
;
\rPersonalDetails: ${$w( “#radioGroup2” ).value}
\rPropertyDetails: ${$w( “#radioGroup1” ).value}
\rPropertyType: ${$w( “#dropdown1” ).value}
\rPropertyType: ${$w( “#dropdown2” ).value}
\rCity: ${$w( “#input3” ).value}
\rLocation: ${$w( “#input2” ).value}`;
sendEmail(subject, body)
.then(response => console.log(response));
}
Here is my Debug Error
public/pages/om7a8.js/om7a8.js: Expecting Unicode escape sequence \uXXXX (13:5)
11 | \rE-mail: ${$w(“#input5”).value}
12 | \rComments: ${$w(“#textBox1”).value}`; >
13 | \rPersonalDetails: ${$w(“#radioGroup2”).value} | ^
14 | \rPropertyDetails: ${$w(“#radioGroup1”).value}
15 | \rPropertyType: ${$w(“#dropdown1”).value}
16 | \rPropertyType: ${$w(“#dropdown2”).value}
Loading the code for the Enquire Now page. To debug this code, open om7a8.js in Developer Tools.