---
title: "המדריך"
url: "https://bpgroup.co.il/guide/"
date: "2025-08-14T12:33:38+03:00"
modified: "2025-08-14T13:48:32+03:00"
author: "bpgroup1212@gmail.com"
---

# המדריך

### ${title}

${message}

 ${continueButton} ${homeButton}

 `; form.innerHTML = successHTML; setTimeout(() =&gt; { const successEl = container.querySelector('.success-message'); successEl.style.transform = 'scale(1)'; successEl.style.opacity = '1'; // Add continue button functionality if (showContinue) { const continueBtn = document.getElementById('continue-btn'); if (continueBtn) { continueBtn.addEventListener('click', function() { // Restore form and show next step location.reload(); // Simple solution - reload and show step 3 // Or we can rebuild the form and show step 3 rebuildFormAndShowStep(3); }); } } // Add home button functionality if (showHome) { const homeBtn = document.getElementById('home-btn'); if (homeBtn) { homeBtn.addEventListener('click', function() { window.open('https://chat.whatsapp.com/Iz3hn5U4V3sJq4MkSu9hKW?mode=ems_copy_c', '_blank'); }); } } }, 100); } // Restore form steps function restoreFormSteps() { // Show all form steps again steps.forEach(step =&gt; { step.style.display = 'block'; step.classList.remove('active'); }); // Hide loading const loadingEl = document.getElementById('loading'); loadingEl.style.display = 'none'; loadingEl.classList.remove('show'); } // Add shake animation for validation errors function shakeElement(element) { element.style.animation = 'shake 0.5s ease-in-out'; setTimeout(() =&gt; { element.style.animation = ''; }, 500); } // Show validation error message function showValidationError(message, targetInput) { // Remove existing error message const existingError = document.querySelector('.validation-error'); if (existingError) { existingError.remove(); } // Create new error message const errorEl = document.createElement('div'); errorEl.className = 'validation-error'; errorEl.textContent = message; errorEl.style.cssText = ` background: #f44336; color: white; padding: 12px 20px; border-radius: 8px; margin: 15px 0; font-size: 14px; font-weight: 500; text-align: center; animation: fadeIn 0.3s ease-in-out; box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3); `; // Insert error message after the target input var input = targetInput || document.getElementById('user_email'); input.parentNode.insertBefore(errorEl, input.nextSibling); // Remove error message after 3 seconds setTimeout(() =&gt; { if (errorEl.parentNode) { errorEl.style.animation = 'fadeOut 0.3s ease-in-out'; setTimeout(() =&gt; { if (errorEl.parentNode) { errorEl.remove(); } }, 300); } }, 3000); } // Add CSS for animations const animationCSS = ` @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } } @keyframes fadeIn { 0% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes fadeOut { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-10px); } } `; const styleSheet = document.createElement('style'); styleSheet.textContent = animationCSS; document.head.appendChild(styleSheet); // Next step functionality document.querySelectorAll('.next-step').forEach(button =&gt; { button.addEventListener('click', function() { const nextStep = parseInt(this.getAttribute('data-next')); const currentStepEl = document.getElementById('step-' + currentStep); const input = currentStepEl.querySelector('input'); if (input &amp;&amp; !input.value.trim()) { shakeElement(input); input.focus(); return; } if (input) { formData[input.name] = input.value; } showStep(nextStep); }); }); // Previous step functionality document.querySelectorAll('.prev-step').forEach(button =&gt; { button.addEventListener('click', function() { const prevStep = parseInt(this.getAttribute('data-prev')); showStep(prevStep); }); }); // Email validation function function validateEmail(email) { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailRegex.test(email); } // Phone validation function function validatePhone(phone) { // Remove all non-digit characters const cleanPhone = phone.replace(/\D/g, ''); // Israeli phone number validation (10 digits starting with 0, or 9 digits) return /^(0\d{8,9}|\d{9})$/.test(cleanPhone); } // Send data button document.getElementById('send-data').addEventListener('click', function() { const emailInput = document.getElementById('user_email'); const emailValue = emailInput.value.trim(); if (!emailValue) { shakeElement(emailInput); emailInput.focus(); return; } if (!validateEmail(emailValue)) { shakeElement(emailInput); emailInput.focus(); showValidationError('כתובת האימייל שהוזנה אינה תקינה', emailInput); return; } formData.user_email = emailValue; // Send to first webhook sendToWebhook(form.getAttribute('data-webhook1'), formData, function() { // Add delay to show loading message longer setTimeout(() =&gt; { showStep(3); }, 2000); // 2 second delay }); }); // Callback yes button document.getElementById('callback-yes').addEventListener('click', function() { const phoneInput = document.getElementById('user_phone'); const phoneValue = phoneInput.value.trim(); if (!phoneValue) { shakeElement(phoneInput); phoneInput.focus(); return; } if (!validatePhone(phoneValue)) { shakeElement(phoneInput); phoneInput.focus(); showValidationError('מספר הטלפון שהוזן אינו תקין. הפורמט הנכון: 0501234567', phoneInput); return; } formData.callback_requested = true; formData.user_phone = phoneValue; // Send to second webhook sendToWebhook(form.getAttribute('data-webhook2'), formData, function() { // Update progress to 100% before showing success progressFill.style.width = '100%'; showSuccessMessage('תודה רבה!', `המומחה שלנו יצור איתך קשר ממש בקרוב

זה הלינק לקבוצת ה-VIP הסגורה 🚀
מצטרפים רק מי שרציניים 💎

קבוצה סגורה ושקטה – בלי ספאם, רק התוכן הכי חד לעצמאות כלכלית.
⚡ ידע שלא עולה לרשתות ⚡

הלינק כאן – להצטרף לפני שאני סוגר כניסות לקבוצה.`, true, false, true); }); }); // Callback no button document.getElementById('callback-no').addEventListener('click', function() { showStep(4); }); // Confirm yes button (final no) document.getElementById('confirm-yes').addEventListener('click', function() { formData.callback_requested = false; formData.final_decision = 'no_callback'; // Send final data to second webhook sendToWebhook(form.getAttribute('data-webhook2'), formData, function() { showStep(5); }); }); // Confirm no button (changed mind - wants callback) document.getElementById('confirm-no').addEventListener('click', function() { // Go back to step 3 to enter phone number showStep(3); }); // Home button functionality document.addEventListener('click', function(e) { if (e.target &amp;&amp; e.target.id === 'home-button') { window.open('https://chat.whatsapp.com/Iz3hn5U4V3sJq4MkSu9hKW?mode=ems_copy_c', '_blank'); } }); // Send to webhook function function sendToWebhook(webhookUrl, data, callback) { if (!webhookUrl) { console.error('Webhook URL not provided'); if (callback) callback(); return; } // Show loading overlay instead of hiding form const loadingEl = document.getElementById('loading'); loadingEl.classList.add('show'); loadingEl.style.display = 'block'; fetch(webhookUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data) }) .then(response =&gt; { loadingEl.classList.remove('show'); loadingEl.style.display = 'none'; if (callback) callback(); }) .catch(error =&gt; { loadingEl.classList.remove('show'); loadingEl.style.display = 'none'; console.error('Error:', error); showSuccessMessage('שגיאה', 'אירעה שגיאה בשליחת הנתונים. אנא נסה שוב.', false); }); } // Initialize updateProgress(); });
