{"id":186,"date":"2026-05-29T03:29:42","date_gmt":"2026-05-29T03:29:42","guid":{"rendered":"https:\/\/dev.wptoolshub.com\/personalinjury\/?page_id=186"},"modified":"2026-05-30T18:42:49","modified_gmt":"2026-05-30T18:42:49","slug":"apply","status":"publish","type":"page","link":"https:\/\/dev.wptoolshub.com\/personalinjury\/apply\/","title":{"rendered":"Apply"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"186\" class=\"elementor elementor-186\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d8ef29f e-flex e-con-boxed e-con e-parent\" data-id=\"d8ef29f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7c7ece7 elementor-widget elementor-widget-html\" data-id=\"7c7ece7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n#pio-wrapper,\n#pio-wrapper *,\n#pio-wrapper *::before,\n#pio-wrapper *::after {\n  box-sizing: border-box;\n}\n\n#pio-wrapper {\n  --brand: #2a9db5;\n  --brand-dark: #1d7d91;\n  --brand-light: #e4f5f9;\n  --text-dark: #1a1a2e;\n  --text-mid: #444;\n  --text-soft: #777;\n  --border: #d4d4d4;\n  --bg-page: #eef0f2;\n  --bg-card: #f6f7f8;\n  --bg-opt: #ffffff;\n  --radius-card: 18px;\n  --radius-btn: 11px;\n  --shadow-card: 0 4px 24px rgba(0,0,0,0.09);\n  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;\n  width: 100%;\n  max-width: 600px;\n  margin: 0 auto;\n  padding: 24px 14px 48px;\n  background: var(--bg-page);\n  font-family: var(--font);\n  -webkit-font-smoothing: antialiased;\n}\n\n#pio-wrapper h1,\n#pio-wrapper h2,\n#pio-wrapper h3,\n#pio-wrapper p,\n#pio-wrapper button,\n#pio-wrapper input,\n#pio-wrapper select {\n  margin: 0;\n}\n\n.card {\n  background: var(--bg-card);\n  border-radius: var(--radius-card);\n  padding: 36px 32px 30px;\n  box-shadow: var(--shadow-card);\n}\n\n.progress-wrap { display: flex; justify-content: center; margin-bottom: 30px; }\n.ring-container { position: relative; width: 88px; height: 88px; flex-shrink: 0; }\n.ring-container svg { transform: rotate(-90deg); display: block; }\n.ring-bg { fill: none; stroke: #ddd; stroke-width: 6; }\n.ring-fill { fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.55s cubic-bezier(.4,0,.2,1); }\n.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; color: var(--brand); letter-spacing: -0.5px; }\n\n.q-title { font-size: 19px; font-weight: 700; color: var(--text-dark); text-align: center; line-height: 1.35; margin-bottom: 22px; }\n\n#pio-wrapper .opts-col { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }\n#pio-wrapper .opts-row { display: flex; gap: 10px; margin-bottom: 22px; }\n#pio-wrapper .opt {\n  display: flex; align-items: center; justify-content: center; width: 100%; padding: 15px 14px;\n  border: 1.5px solid var(--border); border-radius: var(--radius-btn); background: var(--bg-opt) !important;\n  font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--text-dark) !important;\n  cursor: pointer; text-align: center; line-height: 1.3;\n  transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .1s;\n  -webkit-tap-highlight-color: transparent; touch-action: manipulation;\n}\n#pio-wrapper .opts-row .opt { flex: 1; }\n#pio-wrapper .opt:hover { border-color: var(--brand) !important; background: var(--brand-light) !important; box-shadow: 0 2px 8px rgba(42,157,181,.15); transform: translateY(-1px); }\n#pio-wrapper .opt:active { transform: scale(0.98); }\n#pio-wrapper .opt.selected { border-color: var(--brand) !important; background: var(--brand-light) !important; color: var(--brand-dark) !important; font-weight: 600; }\n\n#pio-wrapper .select-wrap { position: relative; margin-bottom: 14px; }\n#pio-wrapper .state-sel {\n  width: 100%; padding: 16px 44px 16px 16px; border: 2px solid var(--brand) !important;\n  border-radius: var(--radius-btn); background: #fff !important; font-family: var(--font); font-size: 15px;\n  color: var(--text-dark) !important; appearance: none; -webkit-appearance: none; cursor: pointer;\n  transition: border-color .15s, box-shadow .15s;\n}\n#pio-wrapper .select-wrap::after {\n  content: ''; pointer-events: none; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);\n  width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--text-mid);\n}\n#pio-wrapper .state-sel:focus { outline: none; border-color: var(--brand-dark) !important; box-shadow: 0 0 0 3px rgba(42,157,181,.18); }\n\n#pio-wrapper .btn-primary {\n  display: block; width: 100%; padding: 16px; background: var(--brand) !important; color: #fff !important;\n  border: none !important; border-radius: var(--radius-btn); font-family: var(--font); font-size: 16px; font-weight: 700;\n  letter-spacing: .2px; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s;\n  touch-action: manipulation; -webkit-tap-highlight-color: transparent; margin-bottom: 22px;\n}\n#pio-wrapper .btn-primary:hover { background: var(--brand-dark) !important; box-shadow: 0 4px 14px rgba(42,157,181,.35); transform: translateY(-1px); }\n#pio-wrapper .btn-primary:active { transform: scale(0.98); }\n#pio-wrapper .btn-primary:disabled { background: #b0b0b0 !important; cursor: not-allowed; transform: none; box-shadow: none; }\n\n.divider { border: none; border-top: 1px solid #e0e0e0; margin: 4px 0 20px; }\n.agent-row { display: flex; align-items: flex-start; gap: 14px; }\n.avatar-circle { width: 66px; height: 66px; border-radius: 50%; background: #dce8ec; border: 2px solid #c8d8dc; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }\n.avatar-circle svg { width: 100%; height: 100%; display: block; }\n.bubble { position: relative; background: #fff; border: 1px solid #e2e2e2; border-radius: 12px; padding: 13px 15px; font-size: 13.5px; color: var(--text-soft); font-style: italic; line-height: 1.55; flex: 1; }\n.bubble::before { content: ''; position: absolute; left: -9px; top: 18px; border: 6px solid transparent; border-right-color: #e2e2e2; border-left: 0; }\n.bubble::after { content: ''; position: absolute; left: -7px; top: 19px; border: 5px solid transparent; border-right-color: #fff; border-left: 0; }\n\n.contact-intro { text-align: center; margin-bottom: 24px; }\n.contact-intro h2 { font-size: 19px; font-weight: 800; color: var(--text-dark); margin-bottom: 10px; line-height: 1.3; }\n.contact-intro p { font-size: 14px; color: var(--text-mid); line-height: 1.65; }\n.contact-intro strong { color: var(--text-dark); }\n.field-wrap { position: relative; margin-bottom: 12px; }\n.input { display: block; width: 100%; padding: 15px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-btn); background: #fff; font-family: var(--font); font-size: 15px; color: var(--text-dark); transition: border-color .15s, box-shadow .15s; }\n.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,157,181,.15); }\n.input::placeholder { color: #b0b0b0; }\n.input.err { border-color: #d93025; }\n.input.err:focus { box-shadow: 0 0 0 3px rgba(217,48,37,.15); }\n.err-msg { display: none; font-size: 12.5px; color: #d93025; margin-top: -8px; margin-bottom: 10px; padding-left: 4px; }\n.tcpa { font-size: 11.5px; color: var(--text-soft); line-height: 1.65; margin-top: 4px; }\n.tcpa a { color: var(--brand); text-decoration: none; }\n.tcpa a:hover { text-decoration: underline; }\n\n.ty-wrap { text-align: center; padding: 14px 0 6px; }\n.ty-icon { width: 76px; height: 76px; background: var(--brand-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }\n.ty-icon svg { width: 40px; height: 40px; }\n.ty-wrap h2 { font-size: 22px; font-weight: 800; color: var(--text-dark); margin-bottom: 12px; }\n.ty-wrap p { font-size: 15px; color: var(--text-mid); line-height: 1.7; max-width: 400px; margin: 0 auto; }\n\n.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 8px; }\n@keyframes spin { to { transform: rotate(360deg); } }\n.step { animation: slideUp .28s ease both; }\n@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }\n\n@media (max-width: 640px) {\n  #pio-wrapper { padding: 16px 10px 40px; }\n  .card { padding: 28px 20px 24px; border-radius: 14px; }\n  .q-title { font-size: 17px; margin-bottom: 18px; }\n  .opt { font-size: 14.5px; padding: 14px 12px; }\n  .btn-primary { font-size: 15px; padding: 15px; }\n  .ring-container { width: 78px; height: 78px; }\n  .ring-label { font-size: 17px; }\n}\n\n@media (max-width: 400px) {\n  #pio-wrapper { padding: 10px 8px 32px; }\n  .card { padding: 22px 16px 20px; border-radius: 12px; }\n  .q-title { font-size: 16px; }\n  .opt { font-size: 14px; padding: 13px 10px; border-radius: 9px; }\n  .opts-row { gap: 8px; }\n  .opts-col { gap: 8px; }\n  .btn-primary { font-size: 14.5px; padding: 14px; border-radius: 9px; }\n  .avatar-circle { width: 54px; height: 54px; }\n  .bubble { font-size: 12.5px; padding: 11px 13px; }\n  .contact-intro h2 { font-size: 17px; }\n  .input { font-size: 14px; padding: 13px 14px; }\n}\n<\/style>\n\n<div id=\"pio-wrapper\">\n  <div class=\"card\" id=\"form-card\"><\/div>\n<\/div>\n\n<script>\n\/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n   HUBSPOT CONFIGURATION\n   These values were copied from your already-working HubSpot form.\n   This version submits standard fields individually and bundles all\n   quiz answers into HubSpot's default \"message\" field.\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 *\/\nconst HUBSPOT_ENABLED   = true;\nconst HUBSPOT_PORTAL_ID = '242480779';\nconst HUBSPOT_FORM_ID   = '5998004f-0e0d-4d00-8f99-b1e3832cdd1d';\nconst THANKYOU_URL      = 'https:\/\/dev.wptoolshub.com\/personalinjury\/thank-you\/';\n\nconst STEPS = [\n  { id: 'injured', progress: 11, type: 'two-btn', question: 'Were you physically injured in an automobile accident?', hint: 'The type and severity of your injury has an impact on your settlement value.', options: ['Yes', 'No'] },\n  { id: 'when', progress: 22, type: 'list', question: 'When did the accident occur?', hint: 'Accidents that have happened more recently receive higher settlements.', options: ['Within 1 Month','Within 6 Months','Within 1 Year','Within 2 Years','More Than 2 Years Ago'] },\n  { id: 'state', progress: 28, type: 'state', question: 'In what state did the accident occur?', hint: 'The state where your accident occurred has an impact on the value of your settlement.' },\n  { id: 'injury_type', progress: 33, type: 'list', question: 'What best describes your type of injury?', hint: 'The type of your injury has an impact on your settlement value.', options: ['Whiplash & Soft Tissue','Burns','Broken Bones','Back & Neck Injury','Traumatic Brain Injury'] },\n  { id: 'severity', progress: 44, type: 'list', question: 'What best describes the severity of your injuries?', hint: 'The severity of your injury has an impact on your settlement value.', options: ['Minor','Moderate','Severe','Critical','Life-threatening'] },\n  { id: 'treatment', progress: 55, type: 'two-btn', question: 'Did you receive medical treatment as a result of your injuries?', hint: \"How often and what kind of treatment you've had is helpful in determining your settlement options.\", options: ['Yes','No'] },\n  { id: 'fault', progress: 66, type: 'list', question: 'Were you at fault for the accident?', hint: 'If you were at fault the accident it can seriously hinder your chances for a settlement.', options: ['No, the accident was not my fault','Yes, the accident was my fault'] },\n  { id: 'accident_type', progress: 77, type: 'list', question: 'What best describes your accident?', hint: 'The type of accident and vehicle involved can impact the complexity and value of your case.', options: ['Rear-End Collision','Head-On Collision','T-Bone Accident','Multi-Vehicle Pile-Up','Company Truck Involved','Ride Share Vehicle Involved','Other'] },\n  { id: 'attorney', progress: 88, type: 'list', question: 'Have you spoken to an attorney about your accident?', hint: \"If you haven't spoken to an attorney yet, we can connect you with a local advocate who can answer your questions and help you understand how to claim your settlement amount\u2014for free.\", options: ['No','Yes'] },\n  { id: 'contact', progress: 100, type: 'contact' }\n];\n\nconst US_STATES = [\n  'Alabama','Alaska','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','Washington DC','Florida','Georgia','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','North Carolina','North Dakota','Ohio','Oklahoma','Oregon','Pennsylvania','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virginia','Washington','West Virginia','Wisconsin','Wyoming'\n];\n\nlet step = 0;\nconst answers = {};\n\nconst AVATAR_SVG = `<svg viewBox=\"0 0 70 70\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n  <circle cx=\"35\" cy=\"35\" r=\"35\" fill=\"#cfe4e8\"\/>\n  <ellipse cx=\"35\" cy=\"26\" rx=\"10\" ry=\"11\" fill=\"#f5d0b8\"\/>\n  <ellipse cx=\"35\" cy=\"58\" rx=\"19\" ry=\"13\" fill=\"#a8c8d0\"\/>\n  <circle cx=\"31.5\" cy=\"25\" r=\"1.4\" fill=\"#5a3e2b\"\/>\n  <circle cx=\"38.5\" cy=\"25\" r=\"1.4\" fill=\"#5a3e2b\"\/>\n  <path d=\"M32 29.5 Q35 32 38 29.5\" stroke=\"#b87050\" stroke-width=\"1.2\" fill=\"none\" stroke-linecap=\"round\"\/>\n  <path d=\"M25 25 Q25 14 35 14 Q45 14 45 25\" stroke=\"#5a3e2b\" stroke-width=\"2\" fill=\"none\"\/>\n  <rect x=\"23\" y=\"24\" width=\"4\" height=\"6\" rx=\"2\" fill=\"#5a3e2b\"\/>\n  <rect x=\"43\" y=\"24\" width=\"4\" height=\"6\" rx=\"2\" fill=\"#5a3e2b\"\/>\n  <path d=\"M47 28 Q50 28 50 32\" stroke=\"#5a3e2b\" stroke-width=\"1.5\" fill=\"none\"\/>\n<\/svg>`;\n\nfunction ringHTML(pct) {\n  const r = 34, C = 2 * Math.PI * r;\n  const offset = C - (pct \/ 100) * C;\n  return `<div class=\"progress-wrap\">\n    <div class=\"ring-container\">\n      <svg width=\"88\" height=\"88\" viewBox=\"0 0 88 88\">\n        <circle class=\"ring-bg\" cx=\"44\" cy=\"44\" r=\"${r}\"\/>\n        <circle class=\"ring-fill\" cx=\"44\" cy=\"44\" r=\"${r}\" stroke-dasharray=\"${C.toFixed(2)}\" stroke-dashoffset=\"${offset.toFixed(2)}\"\/>\n      <\/svg>\n      <div class=\"ring-label\">${pct}%<\/div>\n    <\/div>\n  <\/div>`;\n}\n\nfunction bubbleHTML(hint) {\n  return `<hr class=\"divider\">\n  <div class=\"agent-row\">\n    <div class=\"avatar-circle\">${AVATAR_SVG}<\/div>\n    <div class=\"bubble\">${hint}<\/div>\n  <\/div>`;\n}\n\nfunction render() {\n  const card = document.getElementById('form-card');\n  const s = STEPS[step];\n\n  if (s.type === 'contact') { renderContact(card); return; }\n\n  let body = '';\n\n  if (s.type === 'two-btn') {\n    body = `<div class=\"opts-row\">${s.options.map(o =>\n      `<button type=\"button\" class=\"opt${answers[s.id]===o?' selected':''}\" onclick=\"pick(this,'${esc(o)}')\">${o}<\/button>`\n    ).join('')}<\/div>`;\n  } else if (s.type === 'list') {\n    body = `<div class=\"opts-col\">${s.options.map(o =>\n      `<button type=\"button\" class=\"opt${answers[s.id]===o?' selected':''}\" onclick=\"pick(this,'${esc(o)}')\">${o}<\/button>`\n    ).join('')}<\/div>`;\n  } else if (s.type === 'state') {\n    const opts = US_STATES.map(st => `<option value=\"${st}\"${answers[s.id]===st?' selected':''}>${st}<\/option>`).join('');\n    body = `\n    <div class=\"select-wrap\">\n      <select class=\"state-sel\" id=\"sel-state\" onchange=\"stateChange(this)\">\n        <option value=\"\">Select State<\/option>${opts}\n      <\/select>\n    <\/div>\n    <button type=\"button\" class=\"btn-primary\" id=\"btn-next\" onclick=\"stateNext()\"${answers[s.id]?'':' disabled'}>Next<\/button>`;\n  }\n\n  card.innerHTML = `<div class=\"step\">\n    ${ringHTML(s.progress)}\n    <h2 class=\"q-title\">${s.question}<\/h2>\n    ${body}\n    ${bubbleHTML(s.hint)}\n  <\/div>`;\n}\n\nfunction esc(str) { return String(str).replace(\/'\/g, \"\\\\'\"); }\n\nfunction pick(btn, val) {\n  answers[STEPS[step].id] = val;\n  btn.closest('.opts-row, .opts-col').querySelectorAll('.opt').forEach(b => b.classList.remove('selected'));\n  btn.classList.add('selected');\n  setTimeout(advance, 220);\n}\n\nfunction stateChange(sel) { document.getElementById('btn-next').disabled = !sel.value; }\n\nfunction stateNext() {\n  const v = document.getElementById('sel-state').value;\n  if (!v) return;\n  answers[STEPS[step].id] = v;\n  advance();\n}\n\nfunction advance() {\n  step++;\n  render();\n  window.scrollTo({ top: 0, behavior: 'smooth' });\n}\n\nfunction renderContact(card) {\n  card.innerHTML = `<div class=\"step\">\n    ${ringHTML(100)}\n    <div class=\"contact-intro\">\n      <h2>Your Case is Ready \u2014 Take the Next Step!<\/h2>\n      <p>We've helped over <strong>30,000 accident victims<\/strong> secure the compensation they deserve.\n         A free advocate review will determine if you qualify for an enhanced settlement\u2014up to\n         <strong>7x more than<\/strong> the initial offer.<\/p>\n    <\/div>\n\n    <div class=\"field-wrap\">\n      <input class=\"input\" type=\"text\" id=\"f-first\" placeholder=\"First Name\" autocomplete=\"given-name\">\n    <\/div>\n    <div class=\"field-wrap\">\n      <input class=\"input\" type=\"text\" id=\"f-last\" placeholder=\"Last Name\" autocomplete=\"family-name\">\n    <\/div>\n    <div class=\"field-wrap\">\n      <input class=\"input\" type=\"tel\" id=\"f-phone\" placeholder=\"(555) 555-5555\" autocomplete=\"tel\" oninput=\"fmtPhone(this)\">\n      <div class=\"err-msg\" id=\"err-phone\">Please enter a valid 10-digit phone number.<\/div>\n    <\/div>\n    <div class=\"field-wrap\">\n      <input class=\"input\" type=\"email\" id=\"f-email\" placeholder=\"Email Address\" autocomplete=\"email\">\n      <div class=\"err-msg\" id=\"err-email\">Please enter a valid email address.<\/div>\n    <\/div>\n\n    <button type=\"button\" class=\"btn-primary\" id=\"btn-submit\" onclick=\"submitForm()\">Submit for Review<\/button>\n\n    <p class=\"tcpa\">By clicking \"Submit for Review\", you expressly consent to receive calls and text\n    messages from Personal Injury Options and our marketing partners for marketing purposes using\n    any automatic telephone dialing system or an artificial or prerecorded voice. You may opt out\n    at any time. You agree that we may contact you at any time, including before 8am or after 9pm\n    local time. Consent is not a condition of purchase. You agree to the use of electronic\n    signatures, our <a href=\"https:\/\/dev.wptoolshub.com\/personalinjury\/privacy-policy\/\" target=\"_blank\">Privacy Policy<\/a> and\n    <a href=\"https:\/\/dev.wptoolshub.com\/personalinjury\/terms-conditions\/\" target=\"_blank\">Terms of Use<\/a>.<\/p>\n  <\/div>`;\n}\n\nfunction fmtPhone(el) {\n  let v = el.value.replace(\/\\D\/g,'').slice(0,10);\n  if (v.length >= 7) v = '(' + v.slice(0,3) + ') ' + v.slice(3,6) + '-' + v.slice(6);\n  else if (v.length >= 4) v = '(' + v.slice(0,3) + ') ' + v.slice(3);\n  else if (v.length > 0) v = '(' + v;\n  el.value = v;\n}\n\nfunction submitForm() {\n  const first = document.getElementById('f-first').value.trim();\n  const last  = document.getElementById('f-last').value.trim();\n  const phone = document.getElementById('f-phone').value.trim();\n  const email = document.getElementById('f-email').value.trim();\n\n  let ok = true;\n\n  \/* phone *\/\n  const digits = phone.replace(\/\\D\/g,'');\n  const pErr = document.getElementById('err-phone');\n  const pFld = document.getElementById('f-phone');\n  if (digits.length < 10) {\n    pErr.style.display = 'block'; pFld.classList.add('err'); ok = false;\n  } else {\n    pErr.style.display = 'none';  pFld.classList.remove('err');\n  }\n\n  \/* email *\/\n  const eErr = document.getElementById('err-email');\n  const eFld = document.getElementById('f-email');\n  if (!\/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(email)) {\n    eErr.style.display = 'block'; eFld.classList.add('err'); ok = false;\n  } else {\n    eErr.style.display = 'none';  eFld.classList.remove('err');\n  }\n\n  if (!ok) return;\n\n  \/* loading state *\/\n  const btn = document.getElementById('btn-submit');\n  btn.disabled = true;\n  btn.innerHTML = '<span class=\"spinner\"><\/span> Submitting\u2026';\n\n  \/* \u2500\u2500 HubSpot payload \u2500\u2500 *\/\n  const hsFields = [\n    { name: 'firstname',          value: first },\n    { name: 'lastname',           value: last  },\n    { name: 'phone',              value: phone },\n    { name: 'email',              value: email },\n    { name: 'were_you_injured',   value: answers['injured']      || '' },\n    { name: 'accident_timing',    value: answers['when']         || '' },\n    { name: 'accident_state',     value: answers['state']        || '' },\n    { name: 'injury_type',        value: answers['injury_type']  || '' },\n    { name: 'injury_severity',    value: answers['severity']     || '' },\n    { name: 'received_treatment', value: answers['treatment']    || '' },\n    { name: 'at_fault',           value: answers['fault']        || '' },\n    { name: 'accident_type',      value: answers['accident_type']|| '' },\n    { name: 'spoken_to_attorney', value: answers['attorney']     || '' },\n  ];\n\n  if (HUBSPOT_ENABLED) {\n    const url = `https:\/\/api.hsforms.com\/submissions\/v3\/integration\/submit\/${HUBSPOT_PORTAL_ID}\/${HUBSPOT_FORM_ID}`;\n    fetch(url, {\n      method: 'POST',\n      headers: { 'Content-Type': 'application\/json' },\n      body: JSON.stringify({\n        fields: hsFields,\n        context: { pageUri: window.location.href, pageName: document.title }\n      })\n    })\n    .then(r => { if (!r.ok) throw new Error(r.status); onSuccess(); })\n    .catch(e => { console.error('HubSpot submit error:', e); onSuccess(); \/* still show ty *\/ });\n  } else {\n    \/* HubSpot not yet enabled \u2014 log answers and show thank-you *\/\n    console.log('Form answers (HubSpot disabled):', { first, last, phone, email, ...answers });\n    setTimeout(onSuccess, 600);\n  }\n}\n\nfunction onSuccess() {\n  if (THANKYOU_URL) {\n    window.location.href = THANKYOU_URL;\n    return;\n  }\n  showThankYou();\n}\n\nfunction showThankYou() {\n  document.getElementById('form-card').innerHTML = `\n  <div class=\"step ty-wrap\">\n    <div class=\"ty-icon\">\n      <svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n        <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"#2a9db5\"\/>\n        <path d=\"M11 20l7 7 11-14\" stroke=\"#fff\" stroke-width=\"2.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n      <\/svg>\n    <\/div>\n    <h2>You're All Set!<\/h2>\n    <p>Your case information has been submitted. An advocate will reach out to you shortly\n       to help you understand your settlement options \u2014 completely free of charge.<\/p>\n  <\/div>`;\n}\n\n(function() {\n  const params = new URLSearchParams(window.location.search);\n  const preState = params.get('state');\n  if (preState) answers['state'] = preState;\n})();\n\nrender();\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-186","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/pages\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":35,"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/pages\/186\/revisions"}],"predecessor-version":[{"id":519,"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/pages\/186\/revisions\/519"}],"wp:attachment":[{"href":"https:\/\/dev.wptoolshub.com\/personalinjury\/wp-json\/wp\/v2\/media?parent=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}