Enhance customization options for tiffin delivery and update related styles
This commit is contained in:
parent
6c756ac7ba
commit
b985e6f470
5 changed files with 77 additions and 5 deletions
14
pricing.js
14
pricing.js
|
|
@ -46,3 +46,17 @@ document.querySelector("#pricing-options").innerHTML = options
|
|||
</article>
|
||||
`)
|
||||
.join("");
|
||||
|
||||
document.querySelector("#customize-form").addEventListener("submit", (event) => {
|
||||
event.preventDefault();
|
||||
const form = new FormData(event.currentTarget);
|
||||
const subject = `${selected.name} mode — customized tiffin`;
|
||||
const body = [
|
||||
`Plan: ${selected.name} mode`,
|
||||
`Destination: ${form.get("destination")}`,
|
||||
`Preferred delivery window: ${form.get("timing")}`,
|
||||
`Meal preferences: ${form.get("preferences") || "None specified"}`,
|
||||
].join("\n");
|
||||
window.location.href = `mailto:hello@thetiffinfood.com?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
|
||||
document.querySelector(".form-note").textContent = "Opening your email app with your tiffin preferences.";
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue