Save time and eat healthier with a personalized plan that adapts to your daily rhythm.
The Family Meal Planner is a smart assistant that automatically creates a weekly meal plan based on your habits, goals, and the number of family members.It combines nutritional data and artificial intelligence to suggest balanced, tasty, and practical meals.
Enter a few basic details in the form below and, in just a few seconds, you’ll receive your personalized meal plan by email for the next few days.
Bon appétit!
// JAVASCRIPT LOGIKA - Koristimo IIFE da se kod izvrši odmah i bude izolovan. (function() { // Čekamo da se dokument učita za svaki slučaj document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById("mealForm"); if (!form) return; // Izlazimo ako forma nije pronađena form.addEventListener("submit", async function(e) { // KLJUČNO: Sprečava podnošenje obrasca i otvaranje nove stranice e.preventDefault(); const button = form.querySelector('button[type="submit"]'); const originalButtonText = button.textContent; const messageBox = document.getElementById("responseMessage"); // UI feedback button.disabled = true; button.textContent = 'Šaljem... Molimo sačekajte.'; messageBox.textContent = ''; try { // Slanje podataka u pozadini const response = await fetch(form.action, { method: form.method, body: new FormData(form) }); // Provera da li je HTTP odgovor uspešan (200-299) if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const result = await response.json(); // Prikaz poruke koju vraća n8n messageBox.textContent = result.message || "Uspešno poslato. Proverite svoj email."; form.reset(); messageBox.style.color = '#4CAF50'; // Zelena boja za uspeh } catch (error) { // Uhvaćena je greška (npr. n8n je poslao 500 ili fetch nije uspeo) messageBox.textContent = "Greška pri slanju. Proverite da li je n8n workflow aktivan."; messageBox.style.color = '#f44336'; // Crvena boja za grešku } finally { // Vraćanje dugmeta u prvobitno stanje button.disabled = false; button.textContent = originalButtonText; } }); }); })(); Contact us!