Oryx Cloud pricing and plans

(Save up to 20% on annual plans)

Free Plan

$ 0 / Month
  • Website Builder
  • Free Website Templates
  • Free Hosting
  • Landing Page Builder
  • Forms Builder
  • Calendars and Appointments
  • Lead Management Software
  • 1 Free User

Professional Plan

$ 49 / Month
  • All in Free Plan +
  • Unlimited Pages, Forms and Records
  • Virtual Phone Number
  • eCommerce Services
  • Booking Forms with Payments
  • 10 Users Included

Lead Generation Plan

Starting at $ 995 / Month
  • All in Professional Plan +
  • Guaranteed Leads
  • Digital Marketing Strategy
  • Google Ads Management
  • Google Search (SEO)
  • Google My Business
  • Dedicated Account Manager

All Plans Include

lead management software

Lead Management Software

calendar and appointment system

Calendars and Appointments

online store

Online Store

website builder

Website Builder

landing page builder

Landing Page Builder

website templates

Website Templates

form builder

Form Builder

online payments system

Online Payment

analytics

Analytics

Need Expert Coaching? One time payment of $499 Learn more
  • Free
  • Professional
  • Lead Generation Plan

Free Professional Lead Generation Plan

Website Builder

We will assist you in building a modern and responsive website in less than 1 business day.

Landing Page Builder

Create awesome looking landing pages that convert visitors into leads with Oryxcloud's Landing Page Builder.

Website Templates

Browse through our professionally designed selection of free website templates and customize a design for any occasion.

Online Store

List all your services so customers can book it online.

Free Professional Lead Generation Plan

Digital Marketing Strategy

We start our engagement by analyzing your business goals and building a marketing strategy to achieve it.

Search Engine Marketing

We start our engagement by analyzing your business goals and building a marketing strategy to achieve it.

Search Engine Optimization

We work on both on off-site and on-site SEO to achieve optimal results to gain visibility. Starting at the local level in Houston or Texas and expanding keywords coverage nationally.

Social Media Marketing

With Social Media Marketing, increase your reach out to future customers and build a fans base to spread your brand locally in Houston and nation-wide.

Free Professional Lead Generation Plan

Virtual Phone Numbers

Capture all the leads coming by phone. Enable call recordings to review leads and improve conversion to sales.

Appointments

Create calendars, assign them to service providers, so customers can book and pay for your services online.

Form Builder

Custom forms which helps you generate and collect lead information.

Zapier Integration

Free Professional Lead Generation Plan

Lead Management Software

Lead management (CRM) dashboard to capture and manage all the leads by phone, email, and quotation requests. Collaborate and progress leads to closure.

Sources

A lead source can best be defined as the original point at which a customer first hears about you. It’s the first step in your lead funnel and ground zero for your relationship with your customers.

Custom Fields

Email and SMS Marketing

Oryx Cloud, the best email marketing agency in Houston, can help your company step up its game and grow its business with targeted, trackable email campaigns that are brought to life by integrating social media, web browsing, and mobile technologies.

Free Professional Lead Generation Plan

Checkout Forms

Checkout Forms are a unique feature in Oryx Cloud's Professional and Lead Generation Platform which allow you to take payment from your customers without an invoice.

Sell Services Online

Oryx Cloud helps you sell your professional services online, including online bookings. Create Online Services and Custom Services that customers can book and pay.

Paid Appointments

Stripe Integration

Receive payments online from anywhere, any time from customers. Send payment links to customers to receive payments.

Free Professional Lead Generation Plan

Analytics Dashboard

Oryx Cloud Analytics Dashboards are simply collections of widgets that allow you to quickly visualize your data.

Appointments Analysis

By tracking appointment analytics in your organization you will be able to gain insight into what aspects of your customer-facing channels your clients enjoy, and what is turning them away.

Leads Analysis

Track valuable information on the status of sales efforts and analyze the effectiveness of advertising and promotional efforts in generating inquiries and sales.

Orders Analysis

The Order Analysis shows the trend for order volume over time. This report helps to understand whether the number of orders placed by customers is increasing or decreasing.

Get Help From Experts

As part of Oryx Cloud's onboarding process, we'll get your set up ready with your website, lead sources and stages, training about using the Oryx Cloud platform.

Register For Free
Oryx cloud help and support

Frequently Asked Question

Do I have to pay hosting charges under any of your plans?

No, hosting is free with unlimited bandwidth and unlimited storage.

What is included in the setup fees?

Our team of developers and graphic designers will help create up to 7 pages in your website using your chosen design from our templates and design elements. Also they will help upload the content and images to those pages.

Is content writing and making graphics and images included in the setup price?

No, it is not included. However, please send us an email and we will provide you with a competitive pricing for content and graphics development.

I see that you provide quotation forms and booking forms. Will you charge me extra for those?

No. The price of quotation forms and booking forms is already included in the professional and eCommerce plan.

The quotation or booking form I need is not available in the website builder?

if you are signed up under the professional or eCommerce, please send an email to support@oryxcloud.com with your requirement and will create those forms for you.

How do I contact you if I need help?

Please send an email to support@oryxcloud.com and we will get back to you as soon as possible.

// LeadCenter.ai Quiz Application JavaScript class QuizApp { constructor() { this.currentStep = 0; this.totalSteps = 0; this.answers = {}; this.correctAnswerTriggered = false; this.currentQuestionAnsweredCorrectly = false; this.questions = [ // Personal Details Questions { id: 1, question: "Let's start with some basic information about you and your company", type: "personal_details", fields: [ { name: "name", label: "Name", type: "text", required: true, placeholder: "Enter your full name" }, { name: "email", label: "Email Address", type: "email", required: true, placeholder: "Enter your email address" }, { name: "phone", label: "Phone Number", type: "tel", required: true, placeholder: "Enter your phone number" }, { name: "company", label: "Company Name", type: "text", required: true, placeholder: "Enter your company name" }, { name: "employees", label: "Number of Employees", type: "select", required: true, options: [ "1-5", "6-10", "11-20", "20-50", "More than 50 employees" ] } ] }, // Business Questions { id: 2, question: "Which of the following AE Advisors use LeadCenter.AI?", options: [ "Oak Harvest Financial Group", "Howard Bailey", "West Advisory Group", "CA Educators", "Legato Financials", "Slagle Financials", "Freedom Financials", "Comprehensive Advisors", "Jehm Wealth", "Wealth Planning Network", ], type: "multiple" }, { id: 3, question: "Which challenges does LeadCenter.AI solve for financial advisors?", options: [ "Reducing manual data entry", "Breaking silos between marketing, sales, and operations", "Automating tasks to save valuable time", "Engaging more leads, faster", "Boosting lead-to-appointment conversions", "Driving higher revenue", "Simplifying reports and insights", ], type: "multiple" }, { id: 4, question: "Which of the following functions does LeadCenter.AI automate for financial advisors?", options: [ "Capturing leads from all sources (forms, phone calls, seminar registrations)", "Pushing leads to Redtail, Wealthbox, and Salesforce", "Verifying lead phone numbers and emails", "Transcribing calls and attaching them to contact records", "Creating landing pages and seminar forms on the advisor's website", "Sending client review reminders so clients can book their own appointments", "Producing advisor-specific reports (production reports, 1st appointment conversion, ROI, customer acquisition cost, etc.)", "Capturing notes & tasks from Zoom calls under the contact record", "Lead engagement in the sales funnel by triggering emails & texts based on lead criteria" ], type: "multiple" }, { id: 5, question: "How much can an RIA with 5 employees save, boost revenue, and cut software licensing costs by using LeadCenter.AI?", options: [ "Save $10K annually, does not boost revenue, and not cut in software costs", "Save $100K annually, boost revenue by 1x, and cut software costs by $5K", "Save $223K annually by reclaiming up to 434 workdays, boost revenue by up to 3x, and cut software licensing costs by up to $22K" ], type: "single" } ]; // Banner messages for each question this.bannerMessages = { 1: { success: "That's the correct answer! Great job!", wrong: "That is a wrong answer, please try again" }, 2: { success: "Correct! Well done! Today, more than 1,000 advisors rely on LeadCenter.AI. The platform achieved 950% year-over-year growth last year—clear proof of the value it delivers to advisors", wrong: "That is a wrong answer, please try again" }, 3: { success: "That’s correct! LeadCenter.AI was designed in collaboration with financial advisors, built around their feedback to directly address these challenges", wrong: "That is a wrong answer, please try again" }, 4: { success: "That’s correct! LeadCenter.AI streamlines over 400 processes, empowering financial advisors to save time and focus on their clients.", wrong: "That is a wrong answer, please try again" }, 5: { success: "That’s correct! With LeadCenter.AI, advisors eliminate manual work, freeing up valuable time to focus on driving revenue and serving their clients.", wrong: "That is a wrong answer, please try again" } }; this.init(); } init() { this.totalSteps = this.questions.length; this.renderQuestions(); this.updateProgress(); } renderQuestions() { const container = document.querySelector('.question-container'); container.innerHTML = ''; this.questions.forEach((question, index) => { const questionElement = this.createQuestionElement(question, index); container.appendChild(questionElement); }); } createQuestionElement(question, index) { const questionDiv = document.createElement('div'); questionDiv.className = `question-step ${index === 0 ? 'active' : ''}`; questionDiv.id = `question-${question.id}`; questionDiv.style.display = index === 0 ? 'block' : 'none'; const questionCard = document.createElement('div'); questionCard.className = 'question-card'; const questionTitle = document.createElement('h3'); questionTitle.className = 'question-title'; questionTitle.textContent = question.question; questionCard.appendChild(questionTitle); if (question.type === 'personal_details') { // Create form for personal details const formContainer = document.createElement('div'); formContainer.className = 'personal-details-form'; question.fields.forEach(field => { const fieldGroup = document.createElement('div'); fieldGroup.className = 'form-group mb-3'; const label = document.createElement('label'); label.className = 'form-label'; label.textContent = field.label; if (field.required) { label.innerHTML += ' *'; } let input; if (field.type === 'select') { input = document.createElement('select'); input.className = 'form-control'; input.name = `question-${question.id}-${field.name}`; input.id = `q${question.id}-${field.name}`; input.required = field.required; // Add default option const defaultOption = document.createElement('option'); defaultOption.value = ''; defaultOption.textContent = `Select ${field.label.toLowerCase()}`; input.appendChild(defaultOption); // Add options field.options.forEach(option => { const optionElement = document.createElement('option'); optionElement.value = option; optionElement.textContent = option; input.appendChild(optionElement); }); } else { input = document.createElement('input'); input.type = field.type; input.className = 'form-control'; input.name = `question-${question.id}-${field.name}`; input.id = `q${question.id}-${field.name}`; input.placeholder = field.placeholder; input.required = field.required; } fieldGroup.appendChild(label); fieldGroup.appendChild(input); // Add email validation for email field (after input is added to fieldGroup) if (field.type === 'email') { this.addEmailValidation(input, fieldGroup); } // Add phone formatting for phone field if (field.type === 'tel') { this.addPhoneFormatting(input); } // Add event listener to update Next button state for personal details if (question.type === 'personal_details') { input.addEventListener('input', () => { this.updateNavigationButtons(); }); input.addEventListener('change', () => { this.updateNavigationButtons(); }); } formContainer.appendChild(fieldGroup); }); questionCard.appendChild(questionTitle); questionCard.appendChild(formContainer); } else { // Create options for regular questions const optionsList = document.createElement('ul'); optionsList.className = 'question-options'; question.options.forEach((option, optionIndex) => { const optionItem = document.createElement('li'); optionItem.className = 'question-option'; const input = document.createElement('input'); input.type = question.type === 'multiple' ? 'checkbox' : 'radio'; input.className = 'option-input'; input.name = `question-${question.id}`; input.value = option; input.id = `q${question.id}-option${optionIndex}`; // Add event listener for answer detection (correct or wrong) input.addEventListener('change', (e) => { if (question.id === 2) { // Special handling for question 2 - multiple choice, all options must be selected this.checkQuestion2Completion(); } else if (question.id === 3) { // Special handling for question 3 - multiple choice, all options must be selected this.checkQuestion3Completion(); } else if (question.id === 4) { // Special handling for question 4 - multiple choice, all options must be selected this.checkQuestion4Completion(); } else { // Regular single choice questions if (e.target.checked) { // Check if this is a correct answer if (question.id === 5 && option === 'Save $223K annually by reclaiming up to 434 workdays, boost revenue by up to 3x, and cut software licensing costs by up to $22K') { // Correct answer console.log('Correct answer selected!', e.target.checked); this.currentQuestionAnsweredCorrectly = true; if (!this.correctAnswerTriggered) { this.correctAnswerTriggered = true; this.hideWrongAnswerBanner(); this.showSuccessBanner(); this.playFireworks(); } // Don't update navigation buttons - let popup handle progression } else { // Wrong answer console.log('Wrong answer selected!', option); this.currentQuestionAnsweredCorrectly = false; this.hideSuccessBanner(); this.showWrongAnswerBanner(); this.updateNavigationButtons(); } } } }); const label = document.createElement('label'); label.className = 'option-label'; label.htmlFor = `q${question.id}-option${optionIndex}`; label.textContent = option; // Add click listener to label for answer detection label.addEventListener('click', () => { setTimeout(() => { if (question.id === 2) { // Special handling for question 2 - multiple choice, all options must be selected this.checkQuestion2Completion(); } else if (question.id === 3) { // Special handling for question 3 - multiple choice, all options must be selected this.checkQuestion3Completion(); } else if (question.id === 4) { // Special handling for question 4 - multiple choice, all options must be selected this.checkQuestion4Completion(); } else { // Regular single choice questions if (input.checked) { // Check if this is a correct answer if (question.id === 5 && option === 'Save $223K annually by reclaiming up to 434 workdays, boost revenue by up to 3x, and cut software licensing costs by up to $22K') { // Correct answer console.log('Label clicked for correct answer'); this.currentQuestionAnsweredCorrectly = true; if (!this.correctAnswerTriggered) { console.log('Input is checked, triggering effects'); this.correctAnswerTriggered = true; this.hideWrongAnswerBanner(); this.showSuccessBanner(); this.playFireworks(); } // Don't update navigation buttons - let popup handle progression } else { // Wrong answer console.log('Label clicked for wrong answer'); this.currentQuestionAnsweredCorrectly = false; this.hideSuccessBanner(); this.showWrongAnswerBanner(); this.updateNavigationButtons(); } } } }, 100); }); optionItem.appendChild(input); optionItem.appendChild(label); optionsList.appendChild(optionItem); }); questionCard.appendChild(optionsList); // Add hint for specific questions (after options) // Hint removed as requested } questionDiv.appendChild(questionCard); return questionDiv; } updateProgress() { const progressBar = document.getElementById('progress-bar'); const progressText = document.getElementById('progress-text'); const percentage = ((this.currentStep + 1) / this.totalSteps) * 100; progressBar.style.width = `${percentage}%`; progressText.textContent = `Question ${this.currentStep + 1} of ${this.totalSteps}`; } showQuestion(step) { // Hide all questions document.querySelectorAll('.question-step').forEach(question => { question.style.display = 'none'; question.classList.remove('active'); }); // Show current question const currentQuestion = document.getElementById(`question-${this.questions[step].id}`); if (currentQuestion) { currentQuestion.style.display = 'block'; currentQuestion.classList.add('active'); } // Reset flags for new question this.correctAnswerTriggered = false; this.currentQuestionAnsweredCorrectly = false; // Hide any existing banners this.hideSuccessBanner(); this.hideWrongAnswerBanner(); // Update navigation buttons this.updateNavigationButtons(); // Scroll to top of the page window.scrollTo({ top: 0, behavior: 'smooth' }); } updateNavigationButtons() { const prevBtn = document.getElementById('prev-btn'); const nextBtn = document.getElementById('next-btn'); // Show/hide previous button if (this.currentStep === 0) { prevBtn.style.display = 'none'; } else { prevBtn.style.display = 'block'; } // Update next button text if (this.currentStep === this.totalSteps - 1) { nextBtn.innerHTML = 'Submit Quiz'; } else { nextBtn.innerHTML = 'Next'; } // Disable Next button if current question hasn't been answered correctly const currentQuestion = this.questions[this.currentStep]; if (currentQuestion && currentQuestion.type === 'personal_details') { // For personal details, check if all required fields are filled const allFieldsFilled = this.validateCurrentQuestion(); if (allFieldsFilled) { nextBtn.disabled = false; nextBtn.classList.remove('btn-disabled'); } else { nextBtn.disabled = true; nextBtn.classList.add('btn-disabled'); } } else if (currentQuestion && (currentQuestion.id === 2 || currentQuestion.id === 3 || currentQuestion.id === 4)) { // For questions 2, 3, and 4, enable when all options are selected if (this.currentQuestionAnsweredCorrectly) { nextBtn.disabled = false; nextBtn.classList.remove('btn-disabled'); } else { nextBtn.disabled = true; nextBtn.classList.add('btn-disabled'); } } else { // For other quiz questions, disable until correct answer is selected if (this.currentQuestionAnsweredCorrectly) { nextBtn.disabled = false; nextBtn.classList.remove('btn-disabled'); } else { nextBtn.disabled = true; nextBtn.classList.add('btn-disabled'); } } } saveAnswer() { const currentQuestion = this.questions[this.currentStep]; const questionId = currentQuestion.id; if (currentQuestion.type === 'personal_details') { this.answers[questionId] = {}; currentQuestion.fields.forEach(field => { const input = document.querySelector(`input[name="question-${questionId}-${field.name}"], select[name="question-${questionId}-${field.name}"]`); this.answers[questionId][field.name] = input ? input.value : ''; }); } else if (currentQuestion.type === 'multiple') { const checkboxes = document.querySelectorAll(`input[name="question-${questionId}"]:checked`); this.answers[questionId] = Array.from(checkboxes).map(cb => cb.value); } else { const radio = document.querySelector(`input[name="question-${questionId}"]:checked`); this.answers[questionId] = radio ? radio.value : null; } } loadAnswer() { const currentQuestion = this.questions[this.currentStep]; const questionId = currentQuestion.id; const savedAnswer = this.answers[questionId]; if (savedAnswer) { if (currentQuestion.type === 'personal_details') { currentQuestion.fields.forEach(field => { const input = document.querySelector(`input[name="question-${questionId}-${field.name}"], select[name="question-${questionId}-${field.name}"]`); if (input && savedAnswer[field.name]) { input.value = savedAnswer[field.name]; } }); } else if (currentQuestion.type === 'multiple') { savedAnswer.forEach(answer => { const checkbox = document.querySelector(`input[name="question-${questionId}"][value="${answer}"]`); if (checkbox) checkbox.checked = true; }); } else { const radio = document.querySelector(`input[name="question-${questionId}"][value="${savedAnswer}"]`); if (radio) radio.checked = true; } } } validateCurrentQuestion() { const currentQuestion = this.questions[this.currentStep]; const questionId = currentQuestion.id; if (currentQuestion.type === 'personal_details') { // Check all required fields are filled for (let field of currentQuestion.fields) { if (field.required) { const input = document.querySelector(`input[name="question-${questionId}-${field.name}"], select[name="question-${questionId}-${field.name}"]`); if (!input || !input.value.trim()) { return false; } // Validate email format if it's an email field if (field.type === 'email') { const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; if (!emailRegex.test(input.value.trim())) { return false; } } } } return true; } else if (currentQuestion.type === 'multiple') { if (questionId === 2 || questionId === 3 || questionId === 4) { // For questions 2, 3, and 4, only allow progression if all options are selected const allInputs = document.querySelectorAll(`input[name="question-${questionId}"]`); const checkedInputs = document.querySelectorAll(`input[name="question-${questionId}"]:checked`); return checkedInputs.length === allInputs.length; } else { // For other multiple choice questions, just check if at least one is selected const checkboxes = document.querySelectorAll(`input[name="question-${questionId}"]:checked`); return checkboxes.length > 0; } } else { const radio = document.querySelector(`input[name="question-${questionId}"]:checked`); return radio !== null; } } nextQuestion() { if (!this.validateCurrentQuestion()) { const currentQuestion = this.questions[this.currentStep]; // Don't show validation messages for questions 2, 3, and 4 if (currentQuestion.id === 2 || currentQuestion.id === 3 || currentQuestion.id === 4) { return; } let message = 'Please complete all required fields before proceeding.'; if (currentQuestion.type === 'personal_details') { message = 'Please fill in all required fields and check your email format.'; } else if (currentQuestion.type === 'multiple') { message = 'Please select at least one option before proceeding.'; } else { message = 'Please select an answer before proceeding.'; } this.showValidationMessage(message); return; } this.saveAnswer(); if (this.currentStep < this.totalSteps - 1) { this.currentStep++; this.showQuestion(this.currentStep); this.loadAnswer(); this.updateProgress(); } else { this.submitQuiz(); } } previousQuestion() { if (this.currentStep > 0) { this.saveAnswer(); this.currentStep--; this.showQuestion(this.currentStep); this.loadAnswer(); this.updateProgress(); } } showValidationMessage(message) { // Remove existing validation message const existingMessage = document.querySelector('.validation-message'); if (existingMessage) { existingMessage.remove(); } // Create new validation message const validationDiv = document.createElement('div'); validationDiv.className = 'alert alert-warning validation-message'; validationDiv.innerHTML = `${message}`; // Insert after current question const currentQuestion = document.querySelector('.question-step.active'); currentQuestion.appendChild(validationDiv); // Auto-remove after 3 seconds setTimeout(() => { if (validationDiv.parentNode) { validationDiv.remove(); } }, 3000); } submitQuiz() { this.saveAnswer(); // Show loading state const nextBtn = document.getElementById('next-btn'); const originalText = nextBtn.innerHTML; nextBtn.innerHTML = ' Submitting...'; nextBtn.disabled = true; // Simulate API call setTimeout(() => { this.showThankYouStep(); }, 2000); } showThankYouStep() { // Hide quiz steps document.getElementById('quiz-steps').style.display = 'none'; // Show thank you step document.getElementById('step-thankyou').style.display = 'block'; document.getElementById('step-thankyou').classList.add('active'); // Log answers for debugging console.log('Quiz Answers:', this.answers); } restartQuiz() { // Reset state this.currentStep = 0; this.answers = {}; this.correctAnswerTriggered = false; this.currentQuestionAnsweredCorrectly = false; // Hide thank you step document.getElementById('step-thankyou').style.display = 'none'; document.getElementById('step-thankyou').classList.remove('active'); // Show intro step document.getElementById('step-intro').style.display = 'block'; document.getElementById('step-intro').classList.add('active'); // Reset form document.querySelectorAll('.option-input').forEach(input => { input.checked = false; }); // Hide banners this.hideSuccessBanner(); this.hideWrongAnswerBanner(); this.updateProgress(); } showSuccessBanner() { console.log('Showing success popup...'); const popup = document.getElementById('success-popup'); if (popup) { // Get current question and update text dynamically const currentQuestion = this.questions[this.currentStep]; const message = this.bannerMessages[currentQuestion.id]?.success || "That's the correct answer! Great job!"; // Update the popup text const popupText = document.getElementById('success-popup-text'); if (popupText) { popupText.textContent = message; } // Update button text based on question number const nextButton = popup.querySelector('button[onclick="proceedToNextQuestion()"]'); if (nextButton) { if (currentQuestion.id === 5) { nextButton.innerHTML = 'Submit Quiz '; } else { nextButton.innerHTML = 'Next Question '; } } // Show the modal using Bootstrap const modal = new bootstrap.Modal(popup); modal.show(); console.log('Success popup displayed'); } else { console.error('Success popup element not found!'); } } hideSuccessBanner() { const popup = document.getElementById('success-popup'); if (popup) { const modal = bootstrap.Modal.getInstance(popup); if (modal) { modal.hide(); } } } showWrongAnswerBanner() { console.log('Showing wrong answer banner...'); const banner = document.getElementById('wrong-answer-banner'); if (banner) { // Get current question and update text dynamically const currentQuestion = this.questions[this.currentStep]; const message = this.bannerMessages[currentQuestion.id]?.wrong || "That is a wrong answer, please try again"; // Update the banner text const bannerText = banner.querySelector('strong'); if (bannerText) { bannerText.textContent = message; } banner.style.display = 'block'; console.log('Wrong answer banner displayed'); // Auto-hide after 3 seconds setTimeout(() => { this.hideWrongAnswerBanner(); }, 3000); } else { console.error('Wrong answer banner element not found!'); } } hideWrongAnswerBanner() { const banner = document.getElementById('wrong-answer-banner'); if (banner) { banner.style.display = 'none'; } } addEmailValidation(input, fieldGroup) { // Create error message element const errorElement = document.createElement('div'); errorElement.className = 'email-error text-danger small mt-1'; errorElement.style.display = 'none'; errorElement.textContent = 'Please enter a valid email address in the format name@company.com'; // Add error element after the input fieldGroup.appendChild(errorElement); // Email validation function const validateEmail = (email) => { const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; return emailRegex.test(email); }; // Add event listeners input.addEventListener('blur', () => { const email = input.value.trim(); if (email && !validateEmail(email)) { errorElement.style.display = 'block'; input.classList.add('is-invalid'); } else { errorElement.style.display = 'none'; input.classList.remove('is-invalid'); } }); input.addEventListener('input', () => { const email = input.value.trim(); if (email && !validateEmail(email)) { errorElement.style.display = 'block'; input.classList.add('is-invalid'); } else { errorElement.style.display = 'none'; input.classList.remove('is-invalid'); } }); } addPhoneFormatting(input) { // Set placeholder to show the expected format input.placeholder = '(XXX) XXX-XXXX'; // Add input event listener for formatting input.addEventListener('input', (e) => { let value = e.target.value.replace(/\D/g, ''); // Remove all non-digits // Limit to 10 digits if (value.length > 10) { value = value.substring(0, 10); } // Format the phone number let formattedValue = ''; if (value.length > 0) { if (value.length <= 3) { formattedValue = `(${value}`; } else if (value.length <= 6) { formattedValue = `(${value.substring(0, 3)}) ${value.substring(3)}`; } else { formattedValue = `(${value.substring(0, 3)}) ${value.substring(3, 6)}-${value.substring(6)}`; } } e.target.value = formattedValue; }); // Add keydown event listener to prevent non-numeric input input.addEventListener('keydown', (e) => { // Allow: backspace, delete, tab, escape, enter, home, end, left, right, up, down if ([8, 9, 27, 13, 46, 35, 36, 37, 38, 39, 40].indexOf(e.keyCode) !== -1 || // Allow: Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+X (e.keyCode === 65 && e.ctrlKey === true) || (e.keyCode === 67 && e.ctrlKey === true) || (e.keyCode === 86 && e.ctrlKey === true) || (e.keyCode === 88 && e.ctrlKey === true)) { return; } // Ensure that it is a number and stop the keypress if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { e.preventDefault(); } }); // Add paste event listener to handle pasted content input.addEventListener('paste', (e) => { e.preventDefault(); const pastedData = e.clipboardData.getData('text'); const numbersOnly = pastedData.replace(/\D/g, ''); if (numbersOnly.length <= 10) { input.value = numbersOnly; input.dispatchEvent(new Event('input')); } }); } checkQuestion2Completion() { // Check if all options for question 2 are selected const question2Inputs = document.querySelectorAll('input[name="question-2"]'); const checkedInputs = document.querySelectorAll('input[name="question-2"]:checked'); console.log(`Question 2: ${checkedInputs.length} of ${question2Inputs.length} options selected`); if (checkedInputs.length === question2Inputs.length) { // All options selected - show success popup this.currentQuestionAnsweredCorrectly = true; if (!this.correctAnswerTriggered) { this.correctAnswerTriggered = true; this.hideWrongAnswerBanner(); this.showSuccessBanner(); this.playFireworks(); } // Don't update navigation buttons - let popup handle progression } else { // Not all options selected - hide success popup but don't show error this.currentQuestionAnsweredCorrectly = false; this.hideSuccessBanner(); this.hideWrongAnswerBanner(); // Don't show error message for question 2 this.updateNavigationButtons(); } } checkQuestion3Completion() { // Check if all options for question 3 are selected const question3Inputs = document.querySelectorAll('input[name="question-3"]'); const checkedInputs = document.querySelectorAll('input[name="question-3"]:checked'); console.log(`Question 3: ${checkedInputs.length} of ${question3Inputs.length} options selected`); if (checkedInputs.length === question3Inputs.length) { // All options selected - show success popup this.currentQuestionAnsweredCorrectly = true; if (!this.correctAnswerTriggered) { this.correctAnswerTriggered = true; this.hideWrongAnswerBanner(); this.showSuccessBanner(); this.playFireworks(); } // Don't update navigation buttons - let popup handle progression } else { // Not all options selected - hide success popup but don't show error this.currentQuestionAnsweredCorrectly = false; this.hideSuccessBanner(); this.hideWrongAnswerBanner(); // Don't show error message for question 3 this.updateNavigationButtons(); } } checkQuestion4Completion() { // Check if all options for question 4 are selected const question4Inputs = document.querySelectorAll('input[name="question-4"]'); const checkedInputs = document.querySelectorAll('input[name="question-4"]:checked'); console.log(`Question 4: ${checkedInputs.length} of ${question4Inputs.length} options selected`); if (checkedInputs.length === question4Inputs.length) { // All options selected - show success popup this.currentQuestionAnsweredCorrectly = true; if (!this.correctAnswerTriggered) { this.correctAnswerTriggered = true; this.hideWrongAnswerBanner(); this.showSuccessBanner(); this.playFireworks(); } // Don't update navigation buttons - let popup handle progression } else { // Not all options selected - hide success popup but don't show error this.currentQuestionAnsweredCorrectly = false; this.hideSuccessBanner(); this.hideWrongAnswerBanner(); // Don't show error message for question 4 this.updateNavigationButtons(); } } playFireworks() { console.log('Playing confetti celebration...'); // Use confetti library for celebration if (typeof confetti !== 'undefined') { try { // Multiple confetti bursts for better effect const duration = 3000; const animationEnd = Date.now() + duration; const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 1000 }; function randomInRange(min, max) { return Math.random() * (max - min) + min; } const interval = setInterval(function() { const timeLeft = animationEnd - Date.now(); if (timeLeft <= 0) { return clearInterval(interval); } const particleCount = 50 * (timeLeft / duration); // Launch confetti from different positions confetti({ ...defaults, particleCount, origin: { x: randomInRange(0.1, 0.3), y: Math.random() - 0.2 } }); confetti({ ...defaults, particleCount, origin: { x: randomInRange(0.7, 0.9), y: Math.random() - 0.2 } }); }, 250); console.log('Confetti celebration started'); } catch (error) { console.error('Error with confetti:', error); this.showCelebrationFallback(); } } else { console.log('Confetti library not available, using fallback'); this.showCelebrationFallback(); } } showCelebrationFallback() { console.log('Showing celebration fallback...'); // Create a simple celebration overlay const celebration = document.createElement('div'); celebration.id = 'celebration-fallback'; celebration.style.position = 'fixed'; celebration.style.top = '0'; celebration.style.left = '0'; celebration.style.width = '100%'; celebration.style.height = '100%'; celebration.style.background = 'linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)'; celebration.style.display = 'flex'; celebration.style.alignItems = 'center'; celebration.style.justifyContent = 'center'; celebration.style.zIndex = '9999'; celebration.style.fontSize = '3rem'; celebration.style.fontWeight = 'bold'; celebration.style.color = 'white'; celebration.style.textAlign = 'center'; celebration.style.animation = 'pulse 0.5s ease-in-out infinite alternate'; celebration.innerHTML = '🎉
CORRECT!
🎉'; document.body.appendChild(celebration); // Remove after 3 seconds setTimeout(() => { if (document.body.contains(celebration)) { document.body.removeChild(celebration); } }, 3000); } } // Global functions for button clicks let quizApp; function startQuiz() { // Hide intro step document.getElementById('step-intro').style.display = 'none'; document.getElementById('step-intro').classList.remove('active'); // Show quiz steps document.getElementById('quiz-steps').style.display = 'block'; // Scroll to top of the page window.scrollTo({ top: 0, behavior: 'smooth' }); // Initialize quiz app quizApp = new QuizApp(); } function nextQuestion() { if (quizApp) { quizApp.nextQuestion(); } } function previousQuestion() { if (quizApp) { quizApp.previousQuestion(); } } function restartQuiz() { if (quizApp) { quizApp.restartQuiz(); } } function proceedToNextQuestion() { if (quizApp) { // Hide the success popup quizApp.hideSuccessBanner(); // Proceed to next question quizApp.nextQuestion(); } } // Initialize when page loads document.addEventListener('DOMContentLoaded', function() { // Add smooth scrolling document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); // Add form validation styles const style = document.createElement('style'); style.textContent = ` .validation-message { margin-top: 1rem; animation: slideDown 0.3s ease; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .option-label:focus-within { outline: 2px solid var(--primary-color); outline-offset: 2px; } `; document.head.appendChild(style); // Test function for debugging window.testFireworks = function() { console.log('Testing fireworks and banner...'); if (quizApp) { quizApp.showSuccessBanner(); quizApp.playFireworks(); } else { console.log('Quiz app not initialized yet'); } }; });