<?php
$teatment_type = isset($_REQUEST['treatment']) || !empty($_REQUEST['treatment']) ? $_REQUEST['treatment'] : '';
$p = isset($_REQUEST['p']) || !empty($_REQUEST['p']) ? $_REQUEST['p'] : '';
$how_soon = isset($_REQUEST['how_soon']) || !empty($_REQUEST['how_soon']) ? $_REQUEST['how_soon'] : '';
$fname = isset($_REQUEST['fname']) || !empty($_REQUEST['fname']) ? $_REQUEST['fname'] : '';
$lname = isset($_REQUEST['lname']) || !empty($_REQUEST['lname']) ? $_REQUEST['lname'] : '';
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="HandheldFriendly" content="true">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Survey Latest - Niagara Dental Implant & Oral Surgery</title>
    <meta name="description" content="Niagara Dental Implant & Oral Surgery in Williamsville, NY, offers a full survey form to understand your needs. Don’t dismiss it to enjoy quality services in a few clicks!" />
    <link rel="icon" href="/lp-asset/lp-images/favicon-1icon.png">
    <link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.2/css/bootstrap.min.css">
    <link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/css/intlTelInput.css">
    <link rel="stylesheet" href="/lp-asset/survey-latest-style.css">

    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-NVHLVM6D');</script>
    <!-- End Google Tag Manager -->

<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '716484338055149');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=716484338055149&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
</head>
<body id="survey_page" class="logo-manage">
    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NVHLVM6D"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->


    <header class="lp_header">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-md-6 col-sm-6 col-7 default-padding">
                    <div class="header_logo">
                        <img src="/lp-asset/lp-images/logo-new.svg" alt="Niagara Dental Implant & Oral Surgery">
                    </div>
                </div>
            </div>
        </div>
    </header>
        <div class="lp-main-wrap section_padding form_sec" id="pricing-instantly">
        <div class="container">
            <div class="lp-wrap-inner">
                <div class="table">
                    <div class="row">
                        <div class="col-12">
                            <div class="new_txt_add_miami text-center">
                                <p>Located In <span>Williamsville, NY</span></p>
                            </div>
                        </div>
                    </div>
                    <div class="row align-items-center lp-inner-content">
                        <div class="col-lg-6 col-12">
                            <div class="text-wrap section_title_inner">
                                <h1>Complete This Evaluation To</h1>
                                <div class="list_div mb-3">
                                    <h4>Instantly Discover:</h4>
                                    <ul class="check-list-style">
                                        <li>If You Are A Candidate For Dental Implants</li>
                                        <li>What Treatment Options Are Available For You</li>
                                        <li>Pricing And Financing Options</li>
                                    </ul>
                                </div>
                                <!-- <div class="list_div">
                                    <h4>Bonus!!</h4>
                                    <p>Receive A Special Promotion That Can Save You Thousands!</p>
                                </div> -->
                            </div>
                        </div>
                        <div class="col-lg-6 col-12">
                            <div class="form-main-wrap">
                                <!-- <div class="form-title section_title_inner">
                                    <h2>Get <span>Pricing</span> Instantly </h2>
                                </div>
                                <div class="form-box">
                                    <form class="form">
                                        <div class="form-step" data="1">
                                            <div class="form-content">
                                                <p>Which condition best describes you?*</p>
                                                <input type="hidden" name="tag_name" id="tag_name" value="Dental-Implants">
                                                <input type="hidden" name="tag_name1" id="tag_name1" value="">
                                                <input type="hidden" id="condition">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="condition" value="Missing 1 Tooth">
                                                        <label>Missing 1 Tooth</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="condition" value="Missing Multiple Teeth">
                                                        <label>Missing Multiple Teeth</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="condition" value="Struggling With Traditional Dentures">
                                                        <label>Struggling With Traditional Dentures</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="condition" value="Most Of My Teeth Are In Pretty Bad Shape">
                                                        <label>Most Of My Teeth Are In Pretty Bad Shape</label>
                                                    </div>
                                                    <label class="label1 lbl_condition" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="1" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" />
                                                </button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="2">
                                            <div class="form-content">
                                                <p>Do you currently have any of these dental solutions?*</p>
                                                <input type="hidden" id="dental_solutions">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="dental_solutions" value="Denture or Partial Denture">
                                                        <label>Denture or Partial Denture</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="dental_solutions" value="Bridge, Crown">
                                                        <label>Bridge, Crown</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="dental_solutions" value="Dental Implant">
                                                        <label>Dental Implant</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="dental_solutions" value="None of the above">
                                                        <label>None of the above</label>
                                                    </div>
                                                    <label class="label1 lbl_dental_solutions" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="2" id="previous" class="form-btn previous">
                                                <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" /> Previous </button>
                                                <button type="button" data="2" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" />
                                                </button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="3">
                                            <div class="form-content">
                                                <p>How Long Have You Been Missing Your Teeth? (The longer teeth are missing the more the jaw bone shrinks)*</p>
                                                <input type="hidden" id="how_long">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_long" value="I Still Have Them">
                                                        <label>I Still Have Them</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_long" value="1-6 Months">
                                                        <label>1-6 Months</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_long" value="7-12 Months">
                                                        <label>7-12 Months</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_long" value="1+ Years">
                                                        <label>1+ Years</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_long" value="6+ Years">
                                                        <label>6+ Years</label>
                                                    </div>
                                                    <label class="label1 lbl_how_long" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="3" id="previous" class="form-btn previous">
                                                <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" /> Previous </button>
                                                <button type="button" data="3" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" />
                                                </button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="4">
                                            <div class="form-content">
                                                <p>Are You Currently Unable To Eat Certain Foods Or Have To Modify The Way You Chew?*</p>
                                                <input type="hidden" id="unable_to_eat">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="unable_to_eat" value="Yes">
                                                        <label>Yes</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="unable_to_eat" value="No">
                                                        <label>No</label>
                                                    </div>
                                                    <label class="label1 lbl_unable_to_eat" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="4" id="previous" class="form-btn previous">
                                                <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" /> Previous </button>
                                                <button type="button" data="4" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" />
                                                </button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="5">
                                            <div class="form-content">
                                                <p>Are You Currently Trying To Find Relief From Any Kind Of Pain Or Discomfort?*</p>
                                                <input type="hidden" id="trying_to_find">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="trying_to_find" value="Yes">
                                                        <label>Yes</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="trying_to_find" value="No">
                                                        <label>No</label>
                                                    </div>
                                                    <label class="label1 lbl_trying_to_find" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="5" id="previous" class="form-btn previous">
                                                <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" /> Previous </button>
                                                <button type="button" data="5" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right" />
                                                </button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="6">
                                            <div class="form-content">
                                                <p>Are You Currently Experiencing A Lack Of Confidence In Social Situations or Find Yourself Hiding Your Smile?*</p>
                                                <input type="hidden" id="experiencing">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="experiencing" value="Yes">
                                                        <label>Yes</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="experiencing" value="No">
                                                        <label>No</label>
                                                    </div>
                                                    <label class="label1 lbl_experiencing" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="6" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="6" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="7">
                                            <div class="form-content">
                                                <p>Dental Implant procedures are not covered by insurance. However, many affordable payment plan options exist. Are you interested in a payment plan option?*</p>
                                                <input type="hidden" id="interested_payment_plan">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="interested_payment_plan" value="Yes. I'm interested in affordable payment plan options">
                                                        <label>Yes. I'm interested in affordable payment plan options</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="interested_payment_plan" value="No. I will not need a payment plan">
                                                        <label>No. I will not need a payment plan</label>
                                                    </div>
                                                    <label class="label1 lbl_interested_payment_plan" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="7" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="7" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="8">
                                            <div class="form-content">
                                                <p>Payment plans are available based on credit approval of the patient or a co-signer. Which best describes your credit?*</p>
                                                <input type="hidden" id="payment_plans">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plans" value="Under 500">
                                                        <label>Under 500</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plans" value="501-600">
                                                        <label>501-600</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plans" value="601-649">
                                                        <label>601-649</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plans" value="650-699">
                                                        <label>650-699</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plans" value="700+">
                                                        <label>700+</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plans" value="I don't know">
                                                        <label>I don't know</label>
                                                    </div>
                                                    <label class="label1 lbl_payment_plans" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="8" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="8" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="9">
                                            <div class="form-content">
                                                <p>Based on your credit score you may not qualify for financing without a co-signer. Do you have someone with good credit history who would co-sign with you?*</p>
                                                <input type="hidden" id="credit_history">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="credit_history" value="Yes">
                                                        <label>Yes</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="credit_history" value="No">
                                                        <label>No</label>
                                                    </div>
                                                    <label class="label1 lbl_credit_history" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="9" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="9" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="10">
                                            <div class="form-content">
                                                <p>Unfortunately it looks like you would not be able to qualify for our payment plan options. Do you have any other way to pay for a Dental Implant procedure?*</p>
                                                <input type="hidden" id="payment_plan_options">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plan_options" value="Savings">
                                                        <label>Savings</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plan_options" value="Credit Card">
                                                        <label>Credit Card</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plan_options" value="Retirement Account (401k, etc)">
                                                        <label>Retirement Account (401k, etc)</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plan_options" value="Other loan (Home Equity, etc)">
                                                        <label>Other loan (Home Equity, etc)</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plan_options" value="Help from a relative">
                                                        <label>Help from a relative</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="payment_plan_options" value="No, I don't">
                                                        <label>No, I don't</label>
                                                    </div>
                                                    <label class="label1 lbl_payment_plan_options" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="10" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="10" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="11">
                                            <div class="form-content">
                                                <p>How Ready Do You Feel To Do Something About Your Situation?*</p>
                                                <input type="hidden" id="how_ready_do_you">
                                                <div class="form-que">
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_ready_do_you" value="Somewhat Ready">
                                                        <label>Somewhat Ready</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_ready_do_you" value="Very Ready">
                                                        <label>Very Ready</label>
                                                    </div>
                                                    <div class="form-radio">
                                                        <input type="radio" name="how_ready_do_you" value="I Need Something FAST!">
                                                        <label>I Need Something FAST!</label>
                                                    </div>
                                                    <label class="label1 lbl_how_ready_do_you" style="display: none;">Please ensure you select at least one option</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="11" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="11" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="12">
                                            <div class="form-content">
                                                <p>What Is Your Name?*</p>
                                                <div class="row">
                                                    <div class="col-sm-6">
                                                        <div class="form-que">
                                                            <div class="form-input">
                                                                <input type="hidden" name="hidden" id="hidden_home_form" value="">
                                                                <input type="text" class="form-control" placeholder="First Name" name="first_name" id="first_name">
                                                            </div>
                                                            <label class="label1 lbl_first_name" style="display: none;">Please enter first name</label>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <div class="form-que">
                                                            <div class="form-input">
                                                                <input type="text" class="form-control" placeholder="Last Name" name="last_name" id="last_name">
                                                            </div>
                                                            <label class="label1 lbl_last_name" style="display: none;">Please enter last name</label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="12" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="12" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="13">
                                            <div class="form-content">
                                                <p>What Is Your Best Email Address?*</p>
                                                <div class="form-que">
                                                    <div class="form-input">
                                                        <input type="email" class="form-control" placeholder="What Is Your Best Email Address?" name="email" id="email">
                                                    </div>
                                                    <label class="label1 lbl_email_address" style="display: none;">Please enter email address</label>
                                                    <label class="label1 lbl_email_pattern" style="display: none;">Please enter valid email</label>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="13" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="13" id="next" class="form-btn next">Next <img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/></button>
                                            </div>
                                        </div>
                                        <div class="form-step hide" data="14">
                                            <div class="form-content">
                                                <p>What Is Your Best Phone Number?*</p>
                                                <div class="form-que">
                                                    <div class="form-input">
                                                        <input type="text" class="form-control" placeholder="What Is Your Best Phone Number?" name="phone" id="phone">
                                                    </div>
                                                    <label class="label1 lbl_phone" style="display: none;">Please enter phone number</label>
                                                    <label class="label1 lbl_phone_pattern" style="display: none;">Please enter valid phone</label>
                                                </div>
                                                <div class="form-que">
                                                    <div class="form-input">
                                                        <div class="form-radio form-checkbox">
                                                            <input type="checkbox" name="i_agree" id="i_agree" value="">
                                                            <label style="font-size: 12px;" for="i_agree">I Consent to Receive SMS Notifications, Alerts & Upcoming Details from Niagara Dental Implant & Oral Surgery. Message frequency may vary. Message & data rates may apply. Text HELP for assistance. You may reply STOP to unsubscribe at any time.</label>
                                                            <span class="label1 lbl_i_agree" style="display: none;">This is required.</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-que">
                                                    <div class="form-input">
                                                        <div class="form-radio form-checkbox">
                                                            <input type="checkbox" name="i_agree_marketing_messages" id="i_agree_marketing_messages" value="">
                                                            <label style="font-size: 12px;" for="i_agree_marketing_messages">I Consent to Receive the Occasional Marketing Messages from Niagara Dental Implant & Oral Surgery. You can Reply STOP to unsubscribe at any time.</label>
                                                            <span class="label1 lbl_i_agree_marketing_messages" style="display: none;">This is required.</span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="14" id="previous" class="form-btn previous"><img src="lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                                <button type="button" data="14" id="submit_btn" class="form-btn" value="submit">Submit</button>
                                            </div>
                                        </div>
                                        <div class="form-step step-message hide" data="15">
                                            <div class="form-content">
                                                <h5>Sorry, you may not be a good candidate. <a href="tel:(716) 419-5538">Call us</a> if you have questions</h5>
                                                <div class="form-que">
                                                </div>
                                            </div>
                                            <div class="form-footer">
                                                <button type="button" data="15" id="previous" class="form-btn previous"><img src="/lp-asset/lp-images/arrow-right.svg" alt="arrow-right"/> Previous</button>
                                            </div>
                                        </div>
                                    </form>
                                </div> -->
                                <div class="form-box">
                                    <?php if($teatment_type == 'Dental Implants'){ ?>
                                      <!-- <iframe src="https://api.leadconnectorhq.com/widget/survey/PuMPiAQdSzl4S0e1oWPW" style="border:none;width:100%;" scrolling="no" id="PuMPiAQdSzl4S0e1oWPW" title="Survey Latest - Implants LP"></iframe> -->
                                      <iframe src="https://api.leadconnectorhq.com/widget/survey/AFj118T3I2WlLFy2ZFSQ" style="border:none;width:100%;" scrolling="no" id="AFj118T3I2WlLFy2ZFSQ" title="Survey Latest - Implants LP"></iframe>
                                   
                                    <?php }else{ ?>
                                      <!-- <iframe src="https://api.leadconnectorhq.com/widget/survey/MKO7brIPPnq6bPxwOnde" style="border:none;width:100%;" scrolling="no" id="MKO7brIPPnq6bPxwOnde" title="Survey Latest"></iframe> -->
                                      <iframe src="https://api.leadconnectorhq.com/widget/survey/84lgU1qtQmFtyr70AQxz" style="border:none;width:100%;" scrolling="no" id="84lgU1qtQmFtyr70AQxz" title="Survey Latest"></iframe>
                                    <?php } ?>
                                    <script src="https://link.msgsndr.com/js/form_embed.js"></script>
                                </div>
                                <div class="form-bottom">
                                    <!--<p>I understand the information disclosed in this form may be subject to re-disclosure and may no longer be protected by HIPAA privacy regulations and the HITECH Act.</p>-->
                                    <p style="font-size: 14px;color: #888;">By Booking Your Appointment, you agree to our Terms, Privacy Policy and Cookies Policy. You may receive SMS notifications from us and can opt out at any time.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.2/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.1.62/jquery.inputmask.bundle.js"></script>
    <!-- <script>
        window.addEventListener( "pageshow", function ( event ) {
            var historyTraversal = event.persisted ||
            ( typeof window.performance != "undefined" &&
            window.performance.navigation.type === 2 );
            if ( historyTraversal ) {
              // Handle page restore.
              window.location.reload();
            }
        });
        var url = window.location.href;
        if(url.indexOf("step1") != -1){
            var treatment = 'Dental Implants';
            if(treatment == 'Dental Implants'){
                jQuery('#tag_name1').val('dental-implant');
                jQuery('#tag_name').val('');
            }
        }
        jQuery(document).ready(function(){
            String.prototype.replaceAt = function (index, replacement) {
                return this.substr(0, index) + replacement + this.substr(index + replacement.length);
            }
            jQuery('.next').on('click',function(e){
                var i = jQuery(this).attr('data');
                if(i == 1){
                  if(jQuery('#condition').val() == ''){
                    jQuery('.lbl_condition').show();
                  }else{
                    next(i);
                  }
                }else if(i == 2){
                  if(jQuery('#dental_solutions').val() == ''){
                    jQuery('.lbl_dental_solutions').show();
                  }else{
                    next(i);
                  }
                }else if(i == 3){
                  if(jQuery('#how_long').val() == ''){
                    jQuery('.lbl_how_long').show();
                  }else{
                    next(i);
                  }
                }else if(i == 4){
                  if(jQuery('#unable_to_eat').val() == ''){
                    jQuery('.lbl_unable_to_eat').show();
                  }else{
                    next(i);
                  }
                }else if(i == 5){
                  if(jQuery('#trying_to_find').val() == ''){
                    jQuery('.lbl_trying_to_find').show();
                  }else{
                    next(i);
                  }
                }else if(i == 6){
                  if(jQuery('#experiencing').val() == ''){
                    jQuery('.lbl_experiencing').show();
                  }else{
                    next(i);
                  }
                }else if(i == 7){
                  if(jQuery('#interested_payment_plan').val() == ''){
                    jQuery('.lbl_interested_payment_plan').show();
                  }else{
                    if(jQuery('#interested_payment_plan').val() == 'No. I will not need a payment plan'){
                        var s = 10;
                        next(s);
                    }else{
                        next(i);
                    }
                  }
                }else if(i == 8){
                  if(jQuery('#payment_plans').val() == ''){
                    jQuery('.lbl_payment_plans').show();
                  }else{
                    if(jQuery('#payment_plans').val() == '601-649' || jQuery('#payment_plans').val() == '650-699' || jQuery('#payment_plans').val() == '700+' || jQuery('#payment_plans').val() == "I don't know"){
                      var s = 10;
                      next(s);
                    }else{
                      next(i);
                    }
                  }
                }else if(i == 9){
                  if(jQuery('#credit_history').val() == ''){
                    jQuery('.lbl_credit_history').show();
                  }else{
                    if(jQuery('#credit_history').val() == 'Yes'){
                        var s = 10;
                        next(s);
                    }else{
                        next(i);
                    }
                  }
                }else if(i == 10){
                  if(jQuery('#payment_plan_options').val() == ''){
                    jQuery('.lbl_payment_plan_options').show();
                  }else{
                    if(jQuery('#payment_plan_options').val() == "No, I don't"){
                      var s = 14;
                      next(s);
                    }else{
                      next(i);
                    }
                  }
                }else if(i == 11){
                  if(jQuery('#how_ready_do_you').val() == ''){
                    jQuery('.lbl_how_ready_do_you').show();
                  }else{
                    next(i);
                  }
                }else if(i == 12){
                  if(jQuery('#first_name').val() == '' && jQuery('#last_name').val() == ''){
                    jQuery('.lbl_first_name').show();
                    jQuery('.lbl_last_name').show();
                  }else if ($('#first_name').val() == ''){
                    jQuery('.lbl_first_name').show();
                  }else if ($('#last_name').val() == ''){
                    jQuery('.lbl_last_name').show();
                  }else{
                    next(i);
                  }
                }else if(i == 13){
                  if(jQuery('#email').val() == ''){
                    jQuery('.lbl_email_address').show();
                  }else{
                    jQuery('.lbl_email_address').hide();
                    var email = $('#email').val();
                    var pattern1 = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
                    if (email.match(pattern1)) {
                      jQuery('.lbl_email_pattern').hide();
                      next(i);
                    } else {
                      jQuery('.lbl_email_pattern').show();
                    }
                  }
                }else if(i == 14){
                      if(jQuery('#i_agree').is(':checked') == false && jQuery('#i_agree_marketing_messages').is(':checked') == false){
                            jQuery('.lbl_i_agree').show();
                            jQuery('.lbl_i_agree_marketing_messages').show();
                        } else if(jQuery('#i_agree').is(':checked') == false){
                              jQuery('.lbl_i_agree').show();
                        } else if(jQuery('#i_agree_marketing_messages').is(':checked') == false){
                              jQuery('.lbl_i_agree_marketing_messages').show();
                        }else{
                            next(i);
                        }
                }else {
                  next(i);
                }
              });
              jQuery('.previous').on('click',function(){
                var i = jQuery(this).attr('data');
                if(i == 11){
                  if(jQuery('#interested_payment_plan').val() == 'No. I will not need a payment plan'){
                    var s = 8;
                    previous(s);
                  }else if(jQuery('#payment_plans').val() == '601-649' || jQuery('#payment_plans').val() == '650-699' || jQuery('#payment_plans').val() == '700+' || jQuery('#payment_plans').val() == "I don't know"){
                    var s = 9;
                    previous(s);
                  }else if(jQuery('#credit_history').val() == 'Yes'){
                    var s = 10;
                    previous(s);
                  }else{
                    previous(i);
                  }
                }else if(i == 15){
                  if(jQuery('#payment_plan_options').val() == "No, I don't"){
                      var s = 11;
                      previous(s);
                  }else{
                      previous(i);
                  }
                }else{
                  previous(i);
                }
              });
              function next(i){
                console.log(i);
                jQuery('.form-step').addClass('hide');
                jQuery('.form-step').eq(i).toggleClass('hide');
                if(i == 11) {
                  jQuery("#first_name").focus();
                }else if(i == 12) {
                  jQuery("#email").focus();
                }else if(i == 13) {
                  jQuery("#phone").focus();
                }
              }
              function previous(i){
                r = i-1;
                i = i-2;
                jQuery('.form-step').addClass('hide');
                jQuery('.form-step').eq(i).toggleClass('hide');
              }
              //
              jQuery('input:radio[name="condition"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#condition').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_condition').hide();
                    next(i);
                  }
              });
              jQuery('input:radio[name="dental_solutions"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#dental_solutions').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_dental_solutions').hide();
                    next(i);
                  }
              });
              jQuery('input:radio[name="how_long"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#how_long').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_how_long').hide();
                    next(i);
                  }
              });
              jQuery('input:radio[name="unable_to_eat"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#unable_to_eat').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_unable_to_eat').hide();
                    next(i);
                  }
              });
              jQuery('input:radio[name="trying_to_find"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#trying_to_find').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_trying_to_find').hide();
                    next(i);
                  }
              });
              jQuery('input:radio[name="experiencing"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#experiencing').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_experiencing').hide();
                    next(i);
                  }
              });
              jQuery('input:radio[name="interested_payment_plan"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#interested_payment_plan').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_interested_payment_plan').hide();
                    if(jQuery('#interested_payment_plan').val() == 'No. I will not need a payment plan'){
                    var s = 10;
                    next(s);
                  }else{
                    next(i);
                  }
                  }
              });
              jQuery('input:radio[name="payment_plans"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#payment_plans').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_payment_plans').hide();
                    if(jQuery('#payment_plans').val() == '601-649' || jQuery('#payment_plans').val() == '650-699' || jQuery('#payment_plans').val() == '700+' || jQuery('#payment_plans').val() == "I don't know"){
                    var s = 10;
                    next(s);
                  }else{
                     next(i);
                  }
                  }
              });
              jQuery('input:radio[name="credit_history"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#credit_history').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_credit_history').hide();
                    if(jQuery('#credit_history').val() == 'Yes'){
                    var s = 10;
                    next(s);
                  }else{
                    next(i);
                  }
                  }
              });
              jQuery('input:radio[name="payment_plan_options"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#payment_plan_options').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_payment_plan_options').hide();
                    if(jQuery('#payment_plan_options').val() == "No, I don't"){
                      var s = 14;
                      next(s);
                    }else{
                      next(i);
                    }
                  }
              });
              jQuery('input:radio[name="how_ready_do_you"]').change(function (){
                var i = jQuery(this).parent().parent().parent().next().find('.next').attr('data');
                  jQuery('#how_ready_do_you').val(jQuery(this).val());
                  if(this.value != ''){
                    jQuery('.lbl_how_ready_do_you').hide();
                    next(i);
                  }
              });
              jQuery('#first_name').change(function (){
                  jQuery('#first_name').val(jQuery(this).val());
                  if(this.value != ''){
                  jQuery('.lbl_first_name').hide();
                }
              });
              jQuery('#last_name').change(function (){
                  jQuery('#last_name').val(jQuery(this).val());
                  if(this.value != ''){
                  jQuery('.lbl_last_name').hide();
                }
              });
              jQuery('#email').change(function (){
                  jQuery('#email').val(jQuery(this).val());
                  if(this.value != ''){
                  jQuery('.lbl_email_address').hide();
                  var email = jQuery('#email').val();
                  var pattern1 = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
                  if (email.match(pattern1)) {
                     jQuery('.lbl_email_pattern').hide();
                  } else {
                     jQuery('.lbl_email_pattern').show();
                  }
                }
              });
              jQuery('#phone').change(function (){
                  jQuery('#phone').val(jQuery(this).val());
                  if(this.value != ''){
                  jQuery('.lbl_phone').hide();
                  var phone = jQuery('#phone').val();
                  var pattern = /^\+?1\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/;
                  if (phone.match(pattern)) {
                     jQuery('.lbl_phone_pattern').hide();
                  } else {
                     jQuery('.lbl_phone_pattern').show();
                  }
                }
              });
              jQuery('input:checkbox[name="i_agree"]').change(function (){
                  if(jQuery(this).prop('checked') == true){
                      jQuery(this).val('Yes');
                      jQuery('.lbl_i_agree').css('display','none');
                  }else{
                      jQuery(this).val('');
                      jQuery('.lbl_i_agree').show();
                  }
              });
              jQuery('input:checkbox[name="i_agree_marketing_messages"]').change(function (){
                  if(jQuery(this).prop('checked') == true){
                      jQuery(this).val('Yes');
                      jQuery('.lbl_i_agree_marketing_messages').css('display','none');
                  }else{
                      jQuery(this).val('');
                      jQuery('.lbl_i_agree_marketing_messages').show();
                  }
              });
              // GHL
              jQuery("#phone").keyup(function (e) {
                 var ln = (jQuery(this).val().length) - 1;
                 if (jQuery(this).val().substr(3, 1) == "1") {
                    let a = jQuery(this).val();
                    a = a.replaceAt(3, "_");
                    jQuery(this).val(a);
                    jQuery(this).focus();
                    return false;
                 }
              });
              var phones = [{
                 "mask": "+1(###) ###-####"
              }, {
                 "mask": "(###) ###-##############"
              }];
              jQuery('#phone').inputmask({
                 mask: phones,
                 greedy: false,
                 definitions: {
                    '#': {
                       validator: "[0-9]",
                       cardinality: 1
                    }
                 }
              });
              jQuery('#next').click(function (e) {
                e.preventDefault();
                if (jQuery('#email').val() == '') {
                   jQuery('.lbl_email_address').show();
                }else if (jQuery('#email').val() == '') {
                   jQuery('.lbl_email_address').show();
                }else {
                    var email = jQuery('#email').val();
                    var pattern1 = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
                      if (!email.match(pattern1)) {
                        jQuery('.lbl_email_pattern').show();
                      } else {
                        jQuery('.lbl_email_pattern').css('display', 'none');
                    }
                  }
              });
              jQuery('#submit_btn').click(function (e) {
                 e.preventDefault();
                 if (jQuery('#first_name').val() == '' && jQuery('#last_name').val() == '' && jQuery('#email').val() == '' && jQuery('#i_agree').is(':checked') == false && jQuery('#i_agree_marketing_messages').is(':checked') == false) {
                    jQuery('.lbl_first_name').show();
                    jQuery('.lbl_last_name').show();
                    jQuery('.lbl_email_address').show();
                    jQuery('.lbl_i_agree').show();
                    jQuery('.lbl_i_agree_marketing_messages').show();
                 } else if (jQuery('#first_name').val() == '') {
                    jQuery('.lbl_first_name').show();
                 } else if (jQuery('#last_name').val() == '') {
                    jQuery('.lbl_last_name').show();
                 } else if (jQuery('#email').val() == '') {
                    jQuery('.lbl_email_address').show();
                 }  else if (jQuery('#i_agree').is(':checked') == false) {
                    jQuery('.lbl_i_agree').show();
                    if (jQuery('#i_agree_marketing_messages').is(':checked') == false) {
                        jQuery('.lbl_i_agree_marketing_messages').show();
                    }
                 } else if (jQuery('#i_agree_marketing_messages').is(':checked') == false) {
                    jQuery('.lbl_i_agree_marketing_messages').show();
                 } else if(jQuery('#hidden_home_form').val() == '') {
                    var phone = jQuery('#phone').val();
                    var pattern = /^\+?1\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/;
                    var email = jQuery('#email').val();
                    var pattern1 = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
                    // if (!phone.match(pattern)) {
                    //    jQuery('.lbl_phone_pattern').show();
                    // } else
                    if (!email.match(pattern1)) {
                       jQuery('.lbl_email_pattern').show();
                    } else {
                       // jQuery('.lbl_phone_pattern').css('display', 'none');
                       jQuery('.lbl_email_pattern').css('display', 'none');
                       var first_name  = jQuery('#first_name ').val();
                       var last_name  = jQuery('#last_name ').val();
                       var phone = jQuery('#phone').val();
                       var email = jQuery('#email').val();
                       var condition = jQuery('#condition').val();
                       var dental_solutions = jQuery('#dental_solutions').val();
                       var how_long = jQuery('#how_long').val();
                       var unable_to_eat = jQuery('#unable_to_eat').val();
                       var trying_to_find = jQuery('#trying_to_find').val();
                       var experiencing = jQuery('#experiencing').val();
                       var interested_payment_plan = jQuery('#interested_payment_plan').val();
                       var payment_plans = jQuery('#payment_plans').val();
                       var credit_history = jQuery('#credit_history').val();
                       var payment_plan_options = jQuery('#payment_plan_options').val();
                       var how_ready_do_you = jQuery('#how_ready_do_you').val();
                       var i_agree = jQuery('#i_agree').val();
                       var i_agree_marketing_messages = jQuery('#i_agree_marketing_messages').val();
                       var tag_name = jQuery('#tag_name').val();
                       var tag_name1 = jQuery('#tag_name1').val();
                        if (tag_name1 != '') {
                          if(tag_name != ''){
                            var tags = [tag_name, tag_name1];
                          }else{
                           var tags = [ tag_name1 ];
                          }
                        } else {
                          var tags = [tag_name];
                        }
                       var fd = {
                          email: email,
                          phone: phone,
                          firstName: first_name,
                          lastName: last_name,
                          name: first_name + ' ' + last_name,
                          "tags": tags,
                          "customField": {
                            'QMq3E0rTOyiAfjiMTc3T': condition,
                            'KSuOLGAyBbIZNrlCRVby': dental_solutions,
                            '9N8rVGJGeNBqJyjBmIPp': how_long,
                            'ifVfKQZuY9shZwID3qb3': unable_to_eat,
                            'VdDjfue7UgwL0ur1BL5K': trying_to_find,
                            'sgp8OIEuqQdArQ9fLcm8': experiencing,
                            'lbVx2bL50OV9zK4B0kXA': interested_payment_plan,
                            'WBuAGQ9FNhyK3TP1HadF': payment_plans,
                            'pHtM4MNNc6oV9LiS4lI6': credit_history,
                            'rfpR1oBNpMcxcQpU1Pn6': payment_plan_options,
                            'f1R68tA7WcEznBcI8fjQ': how_ready_do_you,
                            'As3Ipz9NzdIP8ykERqqv': i_agree,
                            'qtZNCVZy8bHHdtovaNCO': i_agree_marketing_messages
                          }
                       };
                       // Niagara Dental Implant & Oral Surgery (Williamsville, NY) --(GHL account)
                       var url = 'https://rest.gohighlevel.com/v1/contacts/';
                       jQuery.ajax({
                          data: fd,
                          type: 'post',
                          url: url,
                          headers: {
                             Authorization: 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2NhdGlvbl9pZCI6InkyMUtDSFppS3dsb2lmZENlQmxyIiwidmVyc2lvbiI6MSwiaWF0IjoxNzUxMzMxNDIwMjI3LCJzdWIiOiJ1TUZ1UHV4QUNqaTNvc1MwaUFQMSJ9.y7PuKC6POx5WLhWJfuRZsTfZOoXJz1hPvCbh2buUzUU'
                          },
                          beforeSend: function () {
                             jQuery('#submit_btn').prop('disabled', 'true');
                             jQuery('#submit_btn').html('processing<i class="fa fa-spinner fa-spin" style="font-size:24px;margin-left: 10px;"></i>');
                          },
                          success: function (data) {
                             if (data.contact) {
                                localStorage.setItem('first_name', jQuery("#first_name").val());
                                localStorage.setItem('last_name', jQuery("#last_name").val());
                                localStorage.setItem('phone', jQuery("#phone").val());
                                localStorage.setItem('email', jQuery("#email").val());
                                jQuery('.lbl_msg_success').show();
                                jQuery('.lbl_msg_success').html('Thank You for submitting.');
                                window.location.href = "/thank-you.html"
                             }
                          }
                       });
                    }
                 }
            });
        });
    </script> -->
    <script>
      window.addEventListener( "pageshow", function ( event ) {
          var historyTraversal = event.persisted ||
          ( typeof window.performance != "undefined" &&
          window.performance.navigation.type === 2 );
          if ( historyTraversal ) {
            // Handle page restore.
            window.location.reload();
          }
        });
        window.addEventListener("message", function (event) {
          if (event.origin === "https://api.leadconnectorhq.com") {
              let phoneNumber = event.data.phone;
              if (phoneNumber) {
                  localStorage.setItem("phone", phoneNumber);
                  console.log("Phone number stored:", phoneNumber);
              }
          }
        });
    </script>
</body>
</html>