サイトに訪れた人がコンタクトフォームで登録した際に、登録があったというメールを送信する方法を知りたいです。サイト訪問者が問い合わせをしたときその通知がgmailで送信されるには以下のコードに何を加えればよいですか?
以下はコンタクトフォームのコードです。
// For full API documentation, including code examples, visit http://wix.to/94BuAAs
let productName;
let productformattedPrice;
$w.onReady(function () {
//TODO: write your page related code here...
// set tour title to page title on load.
let pageTitle = ("#productPage1").title;
$w('#productPage1').getProduct() .then((product) => { $w('#tourTitle').value = product.name; $w('#tourPrice').value = product.formattedPrice; productName = product.name; productformattedPrice = product.formattedPrice; }) .catch((error) => { console.log(error); });
});
import wixData from 'wix-data';
export function submit_click(event, $w) {
//Add your code for this event here:
let firstName = $w('#firstName').value;
let lastName = $w('#lastName').value;
let emailAddress = $w('#emailAddress').value;
let howManyPPL = $w('#howManyPPL').value;
let departureDate = $w('#departureDate').value;
let toSave = { "tourTitle": productName, "tourPrice": productformattedPrice, "firstName": firstName, "lastName": lastName, "emailAddress": emailAddress, "howManyPPL": howManyPPL, "departureDate": departureDate } wixData.save("customForm", toSave) .then((results) => { let item = results; //see item below }) .catch((err) => { let errorMsg = err; });
}
回答1件
あなたの回答
tips
プレビュー