Enhance customization options for tiffin delivery and update related styles

This commit is contained in:
Anurag Jangid 2026-10-08 03:55:24 +05:30
parent 6c756ac7ba
commit b985e6f470
5 changed files with 77 additions and 5 deletions

View file

@ -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.";
});