{"id":28037,"date":"2025-08-01T17:38:00","date_gmt":"2025-08-01T17:38:00","guid":{"rendered":"https:\/\/eadmais.online\/?page_id=28037"},"modified":"2025-08-01T18:33:56","modified_gmt":"2025-08-01T18:33:56","slug":"last-step-to-your-3d-remodel-plan","status":"publish","type":"page","link":"https:\/\/eadmais.online\/en\/last-step-to-your-3d-remodel-plan\/","title":{"rendered":"Last step to your 3D Remodel Plan."},"content":{"rendered":"<!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>Your 3D Remodel Plan<\/title>\n  <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\" \/>\n  <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;600&#038;display=swap\" rel=\"stylesheet\" \/>\n  <style>\n    :root { --primary: #2563eb; --accent: #10b981; --gray: #f4f7fd; }\n    * { box-sizing: border-box; }\n    body { margin: 0; font-family: 'Poppins', sans-serif; background: var(--gray); color: #111; }\n    .container { max-width: 500px; margin: 0 auto; padding: 2rem; }\n    .card { background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.08); padding: 2rem; text-align: center; }\n    h1 { font-size: 1.8rem; margin: 0 0 0.5rem; }\n    p { margin: 0 0 1.5rem; }\n    form { display: flex; flex-direction: column; gap: 1rem; }\n    input { padding: 0.75rem 1rem; font-size: 1rem; border: 2px solid #e2e8f0; border-radius: 8px; transition: border-color 0.2s; }\n    input:focus { outline: none; border-color: var(--primary); }\n    .redirect-link {\n      display: inline-block;\n      margin-top: 18px;\n      padding: 0.75rem 1.5rem;\n      font-size: 1.07rem;\n      font-weight: 600;\n      border: none;\n      border-radius: 8px;\n      background: var(--primary);\n      color: #fff !important;\n      cursor: pointer;\n      text-decoration: none;\n      transition: background 0.2s;\n    }\n    .redirect-link:hover { background: #1d4ed8; }\n    .badges { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }\n    .badge { height: 40px; }\n    .success { display: none; }\n    .error { display: none; color: #dc2626; margin-top: 1rem; }\n  <\/style>\n  <script>\n    const API_URL = 'https:\/\/eadmais.online\/wp-json\/eadmais\/v1\/lead';\n    const redirectUrl = 'https:\/\/eadmais.online\/congratulations-your-3d-remodel-plan-is-coming\/';\n\n    function isValidPhone(phone) {\n      const cleaned = phone.replace(\/\\s+\/g, '');\n      return \/^\\+\\d{10,15}$\/.test(cleaned);\n    }\n\n    async function handleSubmit(e) {\n      e.preventDefault();\n\n      const nameInput  = document.getElementById('name');\n      const emailInput = document.getElementById('email');\n      const phoneInput = document.getElementById('phone');\n\n      const name  = nameInput.value.trim();\n      const email = emailInput.value.trim();\n      const phone = phoneInput.value.trim();\n\n      if (!name || !email || !phone) {\n        alert('Please complete all fields.');\n        return;\n      }\n\n      if (!isValidPhone(phone)) {\n        alert('Please enter a valid phone number with country code (e.g., +15551234567).');\n        return;\n      }\n\n      const [first_name, ...rest] = name.split(' ');\n      const last_name = rest.join(' ');\n\n      const payload = {\n        phone: phone.replace(\/\\s+\/g, ''),\n        email: email,\n        first_name: first_name,\n        last_name: last_name,\n        gender: '',\n        actions: [\n          { action: 'add_tag', tag_name: 'PROJETO_3D' },\n          { action: 'set_field_value', field_name: 'PROJETO_3D', value: 'PROJETO_3D' },\n          { action: 'send_flow', flow_id: 1754072507140 }\n        ]\n      };\n\n      try {\n        const res = await fetch(API_URL, {\n          method: 'POST',\n          headers: { 'Content-Type': 'application\/json' },\n          body: JSON.stringify(payload)\n        });\n\n        if (!res.ok) throw new Error(`API responded ${res.status}`);\n\n        window.location.href = redirectUrl;\n      } catch (err) {\n        console.error(err);\n        document.getElementById('error').style.display = 'block';\n      }\n    }\n\n    window.onload = function() {\n      const redirectLink = document.getElementById('redirect-link');\n      redirectLink.addEventListener('click', function(e) {\n        handleSubmit(e);\n      });\n    }\n  <\/script>\n<\/head>\n<body>\n  <div class=\"container\">\n    <div class=\"card\">\n      <h1>Your 3D Remodel Plan Is Loading\u2026<\/h1>\n      <p>Tell us where to send it.<\/p>\n      <form id=\"form\" action=\"\">\n        <input id=\"name\"  name=\"name\"  type=\"text\"  placeholder=\"First name\"   required \/>\n        <input id=\"email\" name=\"email\" type=\"email\" placeholder=\"Email address\" required \/>\n        <input id=\"phone\" name=\"phone\" type=\"tel\"   placeholder=\"e.g. +1 555 123 4567\" required \/>\n        <a href=\"#\" id=\"redirect-link\" class=\"redirect-link\">Send My Plan &amp; Quote<\/a>\n      <input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\n      <div id=\"success\" class=\"success\">\n        <h2>Thank you! \ud83d\udce9<\/h2>\n        <p>Check your email and phone for your personalized plan.<\/p>\n      <\/div>\n      <div id=\"error\" class=\"error\">Something went wrong. Please try again later.<\/div>\n      <div class=\"badges\">\n        <img decoding=\"async\" src=\"https:\/\/via.placeholder.com\/120x40?text=BBB\" alt=\"BBB Accredited\" class=\"badge\" \/>\n        <img decoding=\"async\" src=\"https:\/\/via.placeholder.com\/120x40?text=Houzz\" alt=\"Houzz\" class=\"badge\" \/>\n        <img decoding=\"async\" src=\"https:\/\/via.placeholder.com\/120x40?text=Financing+Partner\" alt=\"Financing Partner\" class=\"badge\" \/>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/body>\n<\/html>","protected":false},"excerpt":{"rendered":"<p>Your 3D Remodel Plan Your 3D Remodel Plan Is Loading\u2026 Tell us where to send it. Send My Plan &amp; Quote Thank you! \ud83d\udce9 Check your email and phone for your personalized plan. Something went wrong. Please try again later.<\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-28037","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"Matheus Dias","author_link":"https:\/\/eadmais.online\/en\/author\/matheusdias\/"},"uagb_comment_info":0,"uagb_excerpt":"Your 3D Remodel Plan Your 3D Remodel Plan Is Loading\u2026 Tell us where to send it. Send My Plan &amp; Quote Thank you! \ud83d\udce9 Check your email and phone for your personalized plan. Something went wrong. Please try again later.","_links":{"self":[{"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/pages\/28037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/comments?post=28037"}],"version-history":[{"count":5,"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/pages\/28037\/revisions"}],"predecessor-version":[{"id":28047,"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/pages\/28037\/revisions\/28047"}],"wp:attachment":[{"href":"https:\/\/eadmais.online\/en\/wp-json\/wp\/v2\/media?parent=28037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}