{"id":9,"date":"2025-11-21T17:37:17","date_gmt":"2025-11-21T17:37:17","guid":{"rendered":"https:\/\/affordablehousingprograms.org\/?page_id=9"},"modified":"2025-11-25T22:57:17","modified_gmt":"2025-11-25T22:57:17","slug":"home","status":"publish","type":"page","link":"https:\/\/affordablehousingprograms.org\/","title":{"rendered":""},"content":{"rendered":"\n<!-- Top Header Bar -->\n<div style=\"background:#ffffff; border-bottom:1px solid #e4e7f2; padding:14px 20px;\n            box-shadow:0 2px 6px rgba(0,0,0,0.03);\">\n  <div class=\"ahp-header-bar-inner\"\n       style=\"max-width:960px; margin:0 auto; display:flex; align-items:center;\n              justify-content:space-between; font-family:Arial, sans-serif;\">\n\n    <!-- Left: Brand Name -->\n    <div style=\"font-weight:700; font-size:18px; color:#222;\">\n      AffordableHousingPrograms.org\n    <\/div>\n\n    <!-- Right: Trust Bar -->\n    <div style=\"font-size:12px; color:#667;\">\n      Secure Pre-Screening \u2022 Independent Resource \u2022 Encrypted\n    <\/div>\n  <\/div>\n<\/div>\n\n<!-- Spacer between header + title -->\n<div style=\"height:32px;\"><\/div>\n\n<!-- Main Title + Subtext -->\n<h1 class=\"ahp-main-title\"\n    style=\"font-size:26px; text-align:center; margin:0 0 10px; font-weight:700; color:#222;\">\n  Find Affordable Housing Programs You May Qualify For\n<\/h1>\n\n<p style=\"text-align:center; margin:0 0 25px; font-size:16px; color:#555;\">\n  Takes less than 60 seconds. No credit check. No obligations.\n<\/p>\n\n<!-- Quiz Wrapper -->\n<div id=\"ahp-quiz-wrapper\"\n     style=\"margin:0; padding:0 0 10px; font-family: Arial, sans-serif; background:#f5f6fb;\">\n\n  <div class=\"ahp-card\"\n       style=\"max-width:520px; margin:40px auto; background:#ffffff; border-radius:12px;\n              box-shadow:0 4px 18px rgba(0,0,0,0.08); padding:24px 22px 28px; box-sizing:border-box;\">\n\n    <!-- Progress -->\n    <div style=\"font-size:13px; color:#444; margin-bottom:10px;\">\n      <span id=\"progress-text\">Step 1 of 5<\/span>\n    <\/div>\n    <div style=\"width:100%; background:#e5e7f0; border-radius:999px; height:7px; overflow:hidden; margin-bottom:18px;\">\n      <div id=\"progress-bar\" style=\"height:7px; width:20%; background:#2a8dfd; border-radius:999px;\"><\/div>\n    <\/div>\n\n    <!-- Step 1 -->\n    <div class=\"ahp-step ahp-active-step\" style=\"display:block;\">\n      <h2 style=\"font-size:22px; margin:0 0 12px; color:#111;\">\n        What type of home are you looking for?\n      <\/h2>\n      <div style=\"margin-top:12px;\">\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"home_type\" data-value=\"Single Family\">Single Family<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"home_type\" data-value=\"Multi Family\">Multi Family<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"home_type\" data-value=\"Townhouse\">Townhouse<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"home_type\" data-value=\"Condo\">Condo<\/button>\n      <\/div>\n    <\/div>\n\n    <!-- Step 2 -->\n    <div class=\"ahp-step\" style=\"display:none;\">\n      <h2 style=\"font-size:22px; margin:0 0 12px; color:#111;\">\n        How many bedrooms do you need?\n      <\/h2>\n      <div style=\"margin-top:12px;\">\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"bedrooms\" data-value=\"1\">1<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"bedrooms\" data-value=\"2\">2<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"bedrooms\" data-value=\"3\">3<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"bedrooms\" data-value=\"4+\">4+<\/button>\n      <\/div>\n    <\/div>\n\n    <!-- Step 3 -->\n    <div class=\"ahp-step\" style=\"display:none;\">\n      <h2 style=\"font-size:22px; margin:0 0 12px; color:#111;\">\n        What\u2019s your estimated monthly income?\n      <\/h2>\n      <div style=\"margin-top:12px;\">\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"income\" data-value=\"Under $1,500\">Under $1,500<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"income\" data-value=\"$1,500\u2013$2,500\">$1,500\u2013$2,500<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"income\" data-value=\"$2,500\u2013$4,000\">$2,500\u2013$4,000<\/button>\n        <button type=\"button\" class=\"ahp-option-btn\" data-name=\"income\" data-value=\"$4,000+\">$4,000+<\/button>\n      <\/div>\n\n      <p style=\"font-size:13px; color:#5a7dfd; margin-top:14px;\">\n        Matching local &#038; federal housing programs\u2026\n      <\/p>\n    <\/div>\n\n    <!-- Step 4 -->\n    <div class=\"ahp-step\" style=\"display:none;\">\n      <h2 style=\"font-size:22px; margin:0 0 12px; color:#111;\">\n        Where are you looking for housing?\n      <\/h2>\n      <p style=\"font-size:14px; color:#555; margin-top:4px;\">City &#038; state or ZIP code helps us match local programs.<\/p>\n      <input type=\"text\" id=\"ahp-location-input\"\n             placeholder=\"i.e. Cape Coral, FL or 33904\"\n             style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin-top:10px; font-size:15px; box-sizing:border-box;\">\n    <\/div>\n\n    <!-- Step 5 (form) -->\n    <div class=\"ahp-step\" style=\"display:none;\">\n      <h2 style=\"font-size:22px; margin:0 0 12px; color:#111;\">\n        Last step: where should we send your results?\n      <\/h2>\n      <p style=\"font-size:14px; color:#555; margin-top:4px;\">\n        We\u2019ll email you your guide and any matching programs.\n      <\/p>\n\n      <form id=\"ahp-lead-form\" method=\"POST\" action=\"#\">\n\n        <!-- Visible fields -->\n        <input type=\"text\" name=\"first_name\" placeholder=\"First Name\" required\n               style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px;\">\n        <input type=\"text\" name=\"last_name\" placeholder=\"Last Name\" required\n               style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px;\">\n        <input type=\"email\" name=\"email\" placeholder=\"Email Address\" required\n               style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px;\">\n        <input type=\"tel\" name=\"phone\" placeholder=\"Phone (optional)\"\n               style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px;\">\n\n        <!-- Hidden quiz answers -->\n        <input type=\"hidden\" name=\"meta[home_type]\" id=\"ahp-home_type-hidden\">\n        <input type=\"hidden\" name=\"meta[bedrooms]\" id=\"ahp-bedrooms-hidden\">\n        <input type=\"hidden\" name=\"meta[income]\" id=\"ahp-income-hidden\">\n        <input type=\"hidden\" name=\"meta[location]\" id=\"ahp-location-hidden\">\n\n        <button type=\"submit\"\n                style=\"width:100%; background:#2a8dfd; color:#fff; border:none;\n                       padding:14px; font-size:17px; font-weight:600;\n                       border-radius:8px; cursor:pointer; margin-top:8px;\">\n          Show Me My Housing Options \u2192\n        <\/button>\n      <\/form>\n\n      <p style=\"font-size:11px; color:#777; margin-top:8px;\">\n        By clicking the button above, you agree to receive information related to affordable\n        housing programs. You can unsubscribe anytime.\n      <\/p>\n    <\/div>\n\n    <!-- Nav buttons -->\n    <div style=\"display:flex; justify-content:space-between; margin-top:18px;\">\n      <button id=\"ahp-back-btn\" type=\"button\"\n              style=\"padding:10px 16px; font-size:14px; border-radius:6px;\n                     border:1px solid #ccc; background:#fff; color:#333; cursor:pointer; visibility:hidden;\">\n        \u2039 Back\n      <\/button>\n      <button id=\"ahp-next-btn\" type=\"button\"\n              style=\"padding:10px 20px; font-size:14px; border-radius:6px;\n                     border:none; background:#2a8dfd; color:#fff; cursor:pointer;\">\n        Next \u203a\n      <\/button>\n    <\/div>\n  <\/div>\n<\/div>\n\n<style>\n  .ahp-option-btn {\n    display:block;\n    width:100%;\n    text-align:left;\n    margin:6px 0;\n    padding:11px 12px;\n    border-radius:8px;\n    border:1px solid #cfd2e3;\n    background:#f7f8ff;\n    font-size:15px;\n    cursor:pointer;\n  }\n  .ahp-option-btn.ahp-selected {\n    border-color:#2a8dfd;\n    background:#e7f1ff;\n  }\n\n  @media (max-width: 600px) {\n    .ahp-header-bar-inner {\n      flex-direction: column !important;\n      align-items: flex-start !important;\n      gap: 4px !important;\n    }\n    .ahp-main-title {\n      font-size:20px !important;\n      margin:10px 0 8px !important;\n      padding:0 16px !important;\n    }\n    #ahp-quiz-wrapper .ahp-card {\n      margin:24px 12px 30px !important;\n      padding:18px 16px 22px !important;\n    }\n    .ahp-option-btn {\n      font-size:14px !important;\n      padding:10px 11px !important;\n    }\n    #ahp-lead-form input {\n      font-size:14px !important;\n      padding:10px 11px !important;\n    }\n  }\n<\/style>\n\n<script>\n(function(){\n  var currentStep = 0;\n  var wrapper = document.getElementById('ahp-quiz-wrapper');\n  var steps = wrapper.querySelectorAll('.ahp-step');\n  var nextBtn = document.getElementById('ahp-next-btn');\n  var backBtn = document.getElementById('ahp-back-btn');\n  var progressBar = document.getElementById('progress-bar');\n  var progressText = document.getElementById('progress-text');\n\n  function updateProgress(){\n    var total = steps.length;\n    var pct = ((currentStep + 1) \/ total) * 100;\n    progressBar.style.width = pct + '%';\n    progressText.textContent = 'Step ' + (currentStep + 1) + ' of ' + total;\n  }\n\n  function showStep(index){\n    steps.forEach(function(step, i){\n      step.style.display = (i === index) ? 'block' : 'none';\n    });\n    backBtn.style.visibility = index === 0 ? 'hidden' : 'visible';\n    nextBtn.style.display = index === steps.length - 1 ? 'none' : 'inline-block';\n    updateProgress();\n  }\n\n  nextBtn.addEventListener('click', function(){\n    if(currentStep <= 2){\n      var active = steps[currentStep].querySelector('.ahp-option-btn.ahp-selected');\n      if(!active){\n        alert('Please select an option.');\n        return;\n      }\n    }\n    if(currentStep === 3){\n      var loc = document.getElementById('ahp-location-input').value.trim();\n      if(!loc){\n        alert('Please enter your location.');\n        return;\n      }\n      document.getElementById('ahp-location-hidden').value = loc;\n    }\n    if(currentStep < steps.length - 1){\n      currentStep++;\n      showStep(currentStep);\n    }\n  });\n\n  backBtn.addEventListener('click', function(){\n    if(currentStep > 0){\n      currentStep--;\n      showStep(currentStep);\n    }\n  });\n\n  document.addEventListener('click', function(e){\n    if(e.target.classList.contains('ahp-option-btn')){\n      var btn = e.target;\n      var parent = btn.parentNode;\n      parent.querySelectorAll('.ahp-option-btn').forEach(function(b){\n        b.classList.remove('ahp-selected');\n      });\n      btn.classList.add('ahp-selected');\n\n      var name = btn.getAttribute('data-name');\n      var value = btn.getAttribute('data-value');\n\n      if(name === 'home_type') document.getElementById('ahp-home_type-hidden').value = value;\n      if(name === 'bedrooms') document.getElementById('ahp-bedrooms-hidden').value = value;\n      if(name === 'income') document.getElementById('ahp-income-hidden').value = value;\n\n      if(currentStep <= 2){\n        currentStep++;\n        showStep(currentStep);\n      }\n    }\n  });\n\n  \/\/ LeadBranch Submission\n  var leadForm = document.getElementById('ahp-lead-form');\n  if(leadForm){\n    leadForm.addEventListener('submit', function(e){\n      e.preventDefault();\n\n      var payload = {\n        list_id: \"691f72b9755daceb0c0b7f83\",\n        submission_details: {\n          type: \"form\",\n          url: window.location.href\n        },\n        name: {\n          first: leadForm.querySelector(\"input[name='first_name']\").value,\n          last: leadForm.querySelector(\"input[name='last_name']\").value\n        },\n        email: leadForm.querySelector(\"input[name='email']\").value,\n        phone: leadForm.querySelector(\"input[name='phone']\").value || \"\",\n        custom_fields: {\n          home_type: document.getElementById(\"ahp-home_type-hidden\").value,\n          bedrooms: document.getElementById(\"ahp-bedrooms-hidden\").value,\n          income: document.getElementById(\"ahp-income-hidden\").value,\n          location: document.getElementById(\"ahp-location-hidden\").value\n        }\n      };\n\n      fetch(\"https:\/\/app.leadbranch.io\/api\/v1\/lead\/submission\/create\", {\n        method: \"POST\",\n        headers: { \"Content-Type\": \"application\/json\" },\n        body: JSON.stringify(payload)\n      })\n      .then(response => response.json())\n      .then(data => {\n        console.log(\"LeadBranch Response:\", data);\n        window.location.href = \"\/thank-you\";\n      })\n      .catch(error => {\n        console.error(\"LeadBranch Error:\", error);\n        alert(\"Something went wrong. Please try again.\");\n      });\n    });\n  }\n\n  showStep(currentStep);\n})();\n<\/script>\n\n<!-- Footer -->\n<div style=\"text-align:center; font-size:12px; color:#666; margin:30px auto 30px; \n            font-family:Arial, sans-serif; max-width:700px; line-height:1.6;\">\n  <div style=\"font-weight:600; margin-bottom:6px;\">\n    \u00a9 2025 AffordableHousingPrograms.org\n  <\/div>\n  <div style=\"margin-bottom:10px; color:#777;\">\n    AffordableHousingPrograms.org is an independent resource designed to help\n    individuals learn about housing assistance programs. We are not a government agency.\n  <\/div>\n  <div style=\"margin-bottom:14px;\">\n    <a href=\"\/privacy-policy\" style=\"color:#2a8dfd; text-decoration:none; margin:0 6px;\">Privacy Policy<\/a> |\n    <a href=\"\/terms-of-use\" style=\"color:#2a8dfd; text-decoration:none; margin:0 6px;\">Terms of Use<\/a> |\n    <a href=\"\/do-not-sell-my-info\" style=\"color:#2a8dfd; text-decoration:none; margin:0 6px;\">Do Not Sell My Info<\/a>\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>AffordableHousingPrograms.org Secure Pre-Screening \u2022 Independent Resource \u2022 Encrypted Find Affordable Housing Programs You May Qualify For Takes less than 60 seconds. No credit check. No obligations. Step 1 of 5 What type of home are you looking for? Single Family Multi Family Townhouse Condo How many bedrooms do you need? 1 2 3 4+ What\u2019s [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-template-blank.php","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"<!-- wp:html -->\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>Affordable Housing Programs Quiz<\/title>\n<\/head>\n<body style=\"margin:0; padding:0; font-family: Arial, sans-serif; background:#f5f6fb;\">\n\n<div style=\"max-width:520px; margin:40px auto; background:#ffffff; border-radius:12px;\n            box-shadow:0 4px 18px rgba(0,0,0,0.08); padding:24px 22px 28px; box-sizing:border-box;\">\n\n    <!-- Progress -->\n    <div style=\"font-size:13px; color:#444; margin-bottom:10px;\">\n        <span id=\"progress-text\">Step 1 of 5<\/span>\n    <\/div>\n    <div style=\"width:100%; background:#e5e7f0; border-radius:999px; height:7px; overflow:hidden; margin-bottom:18px;\">\n        <div id=\"progress-bar\" style=\"height:7px; width:20%; background:#2a8dfd; border-radius:999px;\"><\/div>\n    <\/div>\n\n    <!-- Step 1 -->\n    <div class=\"step active-step\" style=\"display:block;\">\n        <h2 style=\"font-size:22px; margin:0 0 10px; color:#111;\">\n            What type of home are you looking for?\n        <\/h2>\n        <div style=\"margin-top:12px;\">\n            <button type=\"button\" class=\"option-btn\" data-name=\"home_type\" data-value=\"Single Family\">Single Family<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"home_type\" data-value=\"Multi Family\">Multi Family<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"home_type\" data-value=\"Townhouse\">Townhouse<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"home_type\" data-value=\"Condo\">Condo<\/button>\n        <\/div>\n    <\/div>\n\n    <!-- Step 2 -->\n    <div class=\"step\" style=\"display:none;\">\n        <h2 style=\"font-size:22px; margin:0 0 10px; color:#111;\">\n            How many bedrooms do you need?\n        <\/h2>\n        <div style=\"margin-top:12px;\">\n            <button type=\"button\" class=\"option-btn\" data-name=\"bedrooms\" data-value=\"1\">1<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"bedrooms\" data-value=\"2\">2<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"bedrooms\" data-value=\"3\">3<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"bedrooms\" data-value=\"4+\">4+<\/button>\n        <\/div>\n    <\/div>\n\n    <!-- Step 3 -->\n    <div class=\"step\" style=\"display:none;\">\n        <h2 style=\"font-size:22px; margin:0 0 10px; color:#111;\">\n            What\u2019s your estimated monthly income?\n        <\/h2>\n        <div style=\"margin-top:12px;\">\n            <button type=\"button\" class=\"option-btn\" data-name=\"income\" data-value=\"Under $1,500\">Under $1,500<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"income\" data-value=\"$1,500\u2013$2,500\">$1,500\u2013$2,500<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"income\" data-value=\"$2,500\u2013$4,000\">$2,500\u2013$4,000<\/button>\n            <button type=\"button\" class=\"option-btn\" data-name=\"income\" data-value=\"$4,000+\">$4,000+<\/button>\n        <\/div>\n    <\/div>\n\n    <!-- Step 4 -->\n    <div class=\"step\" style=\"display:none;\">\n        <h2 style=\"font-size:22px; margin:0 0 10px; color:#111;\">\n            Where are you looking for housing?\n        <\/h2>\n        <p style=\"font-size:14px; color:#555; margin-top:4px;\">City & state or ZIP code help us match local programs.<\/p>\n        <input type=\"text\" id=\"location-input\"\n               placeholder=\"e.g. Cape Coral, FL or 33904\"\n               style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin-top:10px; font-size:15px; box-sizing:border-box;\">\n    <\/div>\n\n    <!-- Step 5 (form) -->\n    <div class=\"step\" style=\"display:none;\">\n        <h2 style=\"font-size:22px; margin:0 0 10px; color:#111;\">\n            Last step: where should we send your results?\n        <\/h2>\n        <p style=\"font-size:14px; color:#555; margin-top:4px;\">\n            We\u2019ll email you your guide and any matching programs.\n        <\/p>\n\n        <form id=\"lead-form\" method=\"POST\" action=\"#\"\n              style=\"margin-top:10px;\">\n            <input type=\"text\" name=\"first_name\" placeholder=\"First Name\" required\n                   style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px; box-sizing:border-box;\">\n            <input type=\"text\" name=\"last_name\" placeholder=\"Last Name\" required\n                   style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px; box-sizing:border-box;\">\n            <input type=\"email\" name=\"email\" placeholder=\"Email Address\" required\n                   style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0; font-size:15px; box-sizing:border-box;\">\n            <input type=\"tel\" name=\"phone\" placeholder=\"Phone (optional)\"\n                   style=\"width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; margin:6px 0 10px; font-size:15px; box-sizing:border-box;\">\n\n            <!-- Hidden fields for quiz answers -->\n            <input type=\"hidden\" name=\"home_type\" id=\"home_type_hidden\">\n            <input type=\"hidden\" name=\"bedrooms\" id=\"bedrooms_hidden\">\n            <input type=\"hidden\" name=\"income\" id=\"income_hidden\">\n            <input type=\"hidden\" name=\"location\" id=\"location_hidden\">\n\n            <button type=\"submit\"\n                    style=\"width:100%; background:#2a8dfd; color:#fff; border:none;\n                           padding:14px; font-size:17px; font-weight:600;\n                           border-radius:8px; cursor:pointer; margin-top:8px;\">\n                Show Me My Housing Options \u2192\n            <\/button>\n        <\/form>\n\n        <p style=\"font-size:11px; color:#777; margin-top:8px;\">\n            By clicking the button above, you agree to receive information about affordable\n            housing programs and related services. You can unsubscribe at any time.\n        <\/p>\n    <\/div>\n\n    <!-- Navigation buttons -->\n    <div style=\"display:flex; justify-content:space-between; margin-top:18px;\">\n        <button id=\"back-btn\" type=\"button\"\n                style=\"padding:10px 16px; font-size:14px; border-radius:6px;\n                       border:1px solid #ccc; background:#fff; color:#333; cursor:pointer; visibility:hidden;\">\n            \u2039 Back\n        <\/button>\n        <button id=\"next-btn\" type=\"button\"\n                style=\"padding:10px 20px; font-size:14px; border-radius:6px;\n                       border:none; background:#2a8dfd; color:#fff; cursor:pointer;\">\n            Next \u203a\n        <\/button>\n    <\/div>\n\n<\/div>\n\n<!-- Inline script -->\n<script>\n\/\/ basic styles for option buttons\nvar css = '.option-btn{display:block;width:100%;text-align:left;margin:6px 0;padding:11px 12px;border-radius:8px;border:1px solid #cfd2e3;background:#f7f8ff;font-size:15px;cursor:pointer;}'\n        + '.option-btn.selected{border-color:#2a8dfd;background:#e7f1ff;}';\nvar styleTag = document.createElement('style');\nstyleTag.innerHTML = css;\ndocument.head.appendChild(styleTag);\n\nvar currentStep = 0;\nvar steps = document.getElementsByClassName('step');\nvar nextBtn = document.getElementById('next-btn');\nvar backBtn = document.getElementById('back-btn');\nvar progressBar = document.getElementById('progress-bar');\nvar progressText = document.getElementById('progress-text');\n\nfunction updateProgress() {\n    var totalSteps = steps.length;\n    var pct = ((currentStep + 1) \/ totalSteps) * 100;\n    progressBar.style.width = pct + '%';\n    progressText.textContent = 'Step ' + (currentStep + 1) + ' of ' + totalSteps;\n}\n\nfunction showStep(index) {\n    for (var i = 0; i < steps.length; i++) {\n        steps[i].style.display = (i === index) ? 'block' : 'none';\n        steps[i].classList.toggle('active-step', i === index);\n    }\n    backBtn.style.visibility = index === 0 ? 'hidden' : 'visible';\n    nextBtn.style.display = index === steps.length - 1 ? 'none' : 'inline-block';\n    updateProgress();\n}\n\nnextBtn.addEventListener('click', function () {\n    \/\/ basic validation: require a selection or text where needed\n    if (currentStep === 0 || currentStep === 1 || currentStep === 2) {\n        var activeStep = steps[currentStep];\n        var selected = activeStep.querySelector('.option-btn.selected');\n        if (!selected) {\n            alert('Please choose an option to continue.');\n            return;\n        }\n    }\n    if (currentStep === 3) {\n        var loc = document.getElementById('location-input').value.trim();\n        if (!loc) { alert('Please enter a city or ZIP code.'); return; }\n        document.getElementById('location_hidden').value = loc;\n    }\n    if (currentStep < steps.length - 1) {\n        currentStep++;\n        showStep(currentStep);\n    }\n});\n\nbackBtn.addEventListener('click', function () {\n    if (currentStep > 0) {\n        currentStep--;\n        showStep(currentStep);\n    }\n});\n\n\/\/ handle option button selection + set hidden values\ndocument.addEventListener('click', function (e) {\n    if (e.target.classList.contains('option-btn')) {\n        var btn = e.target;\n        var name = btn.getAttribute('data-name');\n        var value = btn.getAttribute('data-value');\n\n        \/\/ unselect siblings in this step\n        var parent = btn.parentNode;\n        var siblings = parent.querySelectorAll('.option-btn');\n        for (var i = 0; i < siblings.length; i++) {\n            siblings[i].classList.remove('selected');\n        }\n        btn.classList.add('selected');\n\n        \/\/ put into hidden inputs\n        if (name === 'home_type') document.getElementById('home_type_hidden').value = value;\n        if (name === 'bedrooms') document.getElementById('bedrooms_hidden').value = value;\n        if (name === 'income') document.getElementById('income_hidden').value = value;\n\n        \/\/ auto-next on click for early steps\n        if (currentStep <= 2) {\n            currentStep++;\n            showStep(currentStep);\n        }\n    }\n});\n\n\/\/ init\nshowStep(currentStep);\n\n\/\/ handle submit (you can change action URL)\ndocument.getElementById('lead-form').addEventListener('submit', function(){\n    \/\/ here you can integrate with your form handler, Zapier, LeadBranch, etc.\n});\n<\/script>\n\n<\/body>\n<\/html>\n<!-- \/wp:html -->","_et_gb_content_width":"1080","footnotes":""},"class_list":["post-9","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/pages\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":15,"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/pages\/9\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/pages\/9\/revisions\/34"}],"wp:attachment":[{"href":"https:\/\/affordablehousingprograms.org\/index.php\/wp-json\/wp\/v2\/media?parent=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}