Thanks! It works! I have further questions however, now that I am trying to get the code to work to send the email. I keep getting an error message about the email is invalid. And the code I use is as below:
import {sendEmail} from ‘backend/test’;
$w.onReady( () => {
$w(“#dynamicDataset”).onReady( () => {
let itemObj = $w(“#dynamicDataset”).getCurrentItem().email;
function sendFormData() {
const recipient = itemObj;
const subject = New consultation signup **from** ${$w("#input1").value};
const body = Name: ${$w("#input1").value} \rEmail: ${$w("#input2").value} \rPhone: ${$w("#input3").value};
sendEmail(subject, body)
.then(response => console.log(response));
}
} );
} );
If anyone knows where I am making mistakes, please do tell. Thanks!