File: /home/valuehealthquotes/public_html/form.php
<?php
//Ip Function
function getClientIp()
{
$ipaddress = '';
if (getenv('HTTP_CLIENT_IP'))
$ipaddress = getenv('HTTP_CLIENT_IP');
else if (getenv('HTTP_X_FORWARDED_FOR'))
$ipaddress = getenv('HTTP_X_FORWARDED_FOR');
else if (getenv('HTTP_X_FORWARDED'))
$ipaddress = getenv('HTTP_X_FORWARDED');
else if (getenv('HTTP_FORWARDED_FOR'))
$ipaddress = getenv('HTTP_FORWARDED_FOR');
else if (getenv('HTTP_FORWARDED'))
$ipaddress = getenv('HTTP_FORWARDED');
else if (getenv('REMOTE_ADDR'))
$ipaddress = getenv('REMOTE_ADDR');
else
$ipaddress = 'UNKNOWN';
return $ipaddress;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="./assets/img/favicon.png">
<title>Value Health Quotes</title>
<link rel="stylesheet" href="./assets/css/jquerySteps.css">
<link rel="stylesheet" href="./assets/css/style.css">
<link rel="stylesheet" href="./assets/css/plugins.css">
<link rel="stylesheet" href="./assets/css/aqua.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js" integrity="sha512-0QbL0ph8Tc8g5bLhfVzSqxe9GERORsKhIn1IrpxDAgUsbBGz/V7iSav2zzW325XGd1OMLdL4UiqRJj702IeqnQ==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<style>
#msform fieldset:not(:first-of-type) {
display: none;
}
#mybutton {
position: fixed;
bottom: -4px;
right: 10px;
z-index: 1;
}
/*progressbar*/
#progressbar {
margin-bottom: 30px;
overflow: hidden;
/*CSS counters to number the steps*/
counter-reset: step;
}
#progressbar li {
list-style-type: none;
color: #2C3E50;
font-size: 9px;
float: left;
position: relative;
letter-spacing: 1px;
}
#progressbar li:before {
content: counter(step);
counter-increment: step;
line-height: 26px;
display: block;
font-size: 24px;
color: #333;
border-radius: 25px;
}
/*progressbar connectors*/
#progressbar li:after {
content: '';
width: 100%;
height: 2px;
background: white;
position: absolute;
left: -50%;
top: 9px;
z-index: -1;
/*put it behind the numbers*/
}
#progressbar li:first-child:after {
/*connector not needed before the first step*/
content: none;
}
/*marking active/completed steps green*/
/*The number of the step and the connector before it = green*/
#progressbar li.active:before,
#progressbar li.active:after {
background: #4fb01d;
color: white;
padding: 0;
border-radius: 100% !important;
width: 2.2rem;
height: 2.2rem;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1rem;
line-height: 1;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
/* Not relevant to this form */
.dme_link {
margin-top: 30px;
text-align: center;
}
.dme_link a {
background: #FFF;
font-weight: bold;
color: #4fb01d;
border: 0 none;
border-radius: 25px;
cursor: pointer;
padding: 5px 25px;
font-size: 12px;
}
.dme_link a:hover,
.dme_link a:focus {
background: #C5C5F1;
text-decoration: none;
}
.question {
background: #d1e5ff !important;
border: 2px solid #d1e5ff !important;
color: #072b5a;
height: 55px;
font-size: 25px;
font-weight: 600;
border-radius: 7px !important;
width: 100%;
}
.btn-next {
color: #fff;
background-color: #fe0427;
border-color: #fe0427;
border-radius: 4px !important;
width: 60% !important;
}
/*-- FORM --*/
</style>
<script src="./assets/js/jquery.steps.js"></script>
<script src="./assets/js/dobpicker.js"></script>
<a href="tel: +18553641844">
<div id="mybutton">
<button class="btn btn-primary mb-0" style="background: #fe0427; !important; border-color: #fe0427; border-radius: 4px 4px 0 0;">CALL
NOW</button>
</div>
</a>
<style>
.modal {
visibility: hidden;
opacity: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(77, 77, 77, .7);
transition: all .4s;
}
.modal:target {
visibility: visible;
opacity: 1;
}
.modal__content {
border-radius: 4px;
position: relative;
width: 800px;
max-width: 90%;
background: #fff;
padding: 1em 2em;
}
.modal__footer {
text-align: right;
a {
color: #585858;
}
i {
color: #d02d2c;
}
}
.modal__close {
position: absolute;
top: 10px;
right: 10px;
color: #585858;
text-decoration: none;
}
</style>
<!-- Global site tag (gtag.js) - Google Ads -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-867661804"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
// Configure Google Ads Conversion Tracking
gtag('config', 'AW-867661804', { 'send_page_view': false });
</script>
<!-- Phone call conversion tracking -->
<script>
gtag('config', 'AW-867661804/TxnmCMzd_mwQ7O_dnQM', {
'phone_conversion_number': '(855) 709-1222'
});
</script>
</head>
<header class="wrapper bg-light">
<div class="bg-primary text-white fw-bold fs-15">
<div class="container py-1 d-md-flex flex-md-row">
<div class="d-flex flex-row align-items-center me-0 ms-auto" style="margin: auto !important;">
<div class="icon text-white fs-22 mt-1 me-2 d-flex justify-content-center"> <i class="uil uil-phone-volume"></i></div>
<p class="mb-0 text-center"><a href="Tel: +18553641844" style="color: #ffffff">Speak to a Licensed
Agent Now!</a></p>
</div>
</div>
<!-- /.container -->
</div>
<nav class="navbar navbar-expand-lg center-nav transparent navbar-light">
<div class="container d-flex justify-content-center">
<div class="navbar-brand">
<a href="/">
<img src="./assets/img/logo.svg" srcset="./assets/img/logo.svg" style="width: 100%;" alt="">
</a>
</div>
<div class="navbar-collapse offcanvas-nav">
<div class="offcanvas-header d-lg-none d-xl-none">
<a href="/">
<img src="./assets/img/logo.svg" srcset="./assets/img/logo.svg" style="width:100% important;" alt="">
</a>
<button type="button" class="btn-close btn-close-white offcanvas-close offcanvas-nav-close" aria-label="Close"></button>
</div>
<!-- /.navbar-nav -->
</div>
<!-- /.navbar-collapse -->
<div class="navbar-other w-100 d-flex ms-auto">
<ul class="navbar-nav flex-row align-items-center ms-auto" data-sm-skip="true">
<li class="nav-item d-none d-md-block">
<a href="Tel: +18553641844" class="btn btn-primary rounded-pill mb-0">Get Quotes: (855) 709-1222</a>
</li>
</ul>
<!-- /.navbar-nav -->
</div>
<!-- /.navbar-other -->
</div>
<!-- /.container -->
</nav>
<!-- /.navbar -->
</header>
<!-- /header -->
<body>
<div class="container pt-md-12 mt-5">
<div class="row gx-lg-0 gx-xl-8 gy-10 gy-md-13 gy-lg-0 mb-2 mb-md-5 mb-lg-5">
<div class="content text-center clearfix">
<h1>Get Your Quote Now</h1>
<p>If you are in need of immediate assistance you can call us directly at<span class="color: #fe0427"><a href="tel: +18553641844" style="font-weight:700">
(855) 709-1222</a></span>.</p>
<form id="valForm" name="valForm" class="valForm" method="get" class="p-4">
<input type="hidden" name="TrustedURL" id="TrustedURL" value="https://cert.trustedform.com/454a35b802f3e7b63ffabb4efedb7c6ebe67886c">
<input type="hidden" name="DateOfBirth" id="DateOfBirth" class="DateOfBirth">
<!--Get Client IP -->
<?php
$ip = getClientIp();
echo '<input name="IPAddress" type="hidden" value="' . $ip . '" />';
?>
<input type="hidden" class="CampaignKey" name="CampaignKey" id="CampaignKey" value="6afa3b67-5fe4-47bf-bc4b-d963466ef1d3">
<div id="formStepper">
<!--Step 1 -->
<h4 class="mb-1"> <span class="d-none d-md-block">Choose Plan</span></h4>
<section>
<div class="row">
<h2 class="display-6 mb-3 text-center"> When are you looking to begin coverage?</h2>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="asap" class="PlanType next action-button btn btn-next rounded-pill btn-send mb-3" value="ASAP" />
</div>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="within" class="PlanType next action-button btn btn-next rounded-pill btn-send mb-3" value="Within next 30 days" />
</div>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="over" class="PlanType next action-button btn btn-next rounded-pill btn-send mb-3" value="Over 30 days" />
</div>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="looking" class="PlanType next action-button btn btn-next rounded-pill btn-send mb-3" value="Just looking" />
</div>
</div>
<!-- fieldsets -->
</section>
<!--Step 2 -->
<h4 class="mb-1"> <span class="d-none d-md-block">Conditions </span> </h4>
<section>
<div class="row">
<h2 class="display-6 mb-3 text-center"> Do you have any pre-existing health conditions?
</h2>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="yes" class="PreExistingConditions next action-button btn btn-next rounded-pill btn-send mb-3" value="Yes" />
</div>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="no" class="PreExistingConditions next action-button btn btn-next rounded-pill btn-send mb-3" value="No" />
</div>
</div>
</section>
<!--Step 3 -->
<h4 class="mb-1"> <span class="d-none d-md-block">Contact Information</span> </h4>
<section>
<div class="row">
<h2 class="display-6 mb-3 text-center"> Who are we speaking to?</h2>
<div class="col-md-12">
<div class="form-floating mb-4">
<input id="FirstName" type="text" name="FirstName" class="FirstName form-control alpha required" placeholder="First Name" required>
<label for="FirstName d-flex justify-content-center">First Name *</label>
<div class="valid-feedback"> Looks good! </div>
<div class="invalid-feedback"> Please enter your First Name. </div>
</div>
</div>
<!-- /column -->
<div class="col-md-12">
<div class="form-floating mb-4">
<input id="LastName" type="text" name="LastName" class="LastName form-control alpha" placeholder="Last Name" required>
<label for="LastName d-flex justify-content-center">Last Name *</label>
<div class="valid-feedback"> Looks good! </div>
<div class="invalid-feedback"> Please enter your Last Name. </div>
</div>
</div>
<div class="col-md-12">
<div class="form-floating mb-4">
<input type="text" class="form-control phone numer" name="PhoneNumber" id="PhoneNumber" placeholder="Phone Number" minlength="10" maxlength="10" maxlength="30" required>
<label for="PhoneNumber">Phone Number *</label>
<div class="valid-feedback"> Looks good! </div>
<div class="invalid-feedback"> Please enter your Phone Number. </div>
</div>
</div>
<!-- /column -->
<div class="col-md-12">
<div class="form-floating mb-4">
<input id="EmailAddress" type="text" name="EmailAddress" class="EmailAddress form-control" placeholder="Email Address" required>
<label for="EmailAddress">Email *</label>
<div class="valid-feedback"> Looks good! </div>
<div class="invalid-feedback"> Please enter your Email Address. </div>
</div>
</div>
</section>
<!--Step 4 -->
<h4 class="mb-1"> <span class="d-none d-md-block">Date of Birth</span> </h4>
<section>
<div class="row">
<h2 class="display-6 mb-3 text-center"> What is your Date of Birth?</h2>
<div class="col-md-4 col-sm-12">
<label>Month</label>
<select id="dobmonth" class="dobmonth form-select" name="month" required></select>
</div>
<div class="col-md-4 col-sm-12">
<label>Day</label>
<select id="dobday" class="dobday form-select" name="day" required></select>
</div>
<div class="col-md-4 col-sm-12">
<label>Year</label>
<select id="dobyear" class="dobyear form-select" name="year" required></select>
</div>
</div>
</section>
<!--Step 5 -->
<h4 class="mb-1"> <span class="d-none d-md-block">Address</span> </h4>
<section class="wrapper bg-gradient-primary">
<h2 class="display-6 mb-3 text-center"> What is your current Address?</h2>
<div class="row formStepper-p-0">
<div class="col-md-12">
<div class="form-floating mb-4">
<input id="Address" type="text" name="Address" class="Address form-control" placeholder="Street Address" required>
<label for="Address">Street Address *</label>
</div>
</div>
<div class="col-md-12">
<div class="form-floating mb-4">
<input type="text" class="form-control numer ZipCode" minlength="5" maxlength="5" name="ZipCode" id="ZipCode" placeholder="Zip Code" onkeyup="zipCodeLookup(1);" value="<?php echo $_POST["ZipCode"]; ?>">
<label for="ZipCode">Zip Code *</label>
</div>
</div>
<!-- /column -->
<div class="col-md-12">
<div class="form-floating mb-4">
<input type="text" class="form-control numer City" name="City" id="City" placeholder="City" value="<?php echo $_POST["City"]; ?>" required>
<label for="City">City *</label>
</div>
</div>
<div class="col-md-12">
<div class="form-floating mb-4">
<input type="text" class="form-control numer State" name="State" id="State" placeholder="State" value="<?php echo $_POST["state"]; ?>" required>
<label for="State">State *</label>
</div>
</div>
</div>
<div class="container pb-md-6">
<div class="row">
<div class="col-lg-12">
<p>By entering a phone number and email Address, submitting this form, and Clicking "Get Quotes",
you represent that you are at least 18 years old and agree to our Privacy Policy and Terms of Use.
You also authorize valuehealthquotes.com and/or its <a href="#demo-modal">marketing partners</a>
to contact you for marketing/telemarketing purposes at the number and Address provided above, including your
wireless number if provided, using live operators, artificial voice, automated telephone dialing systems, pre-recorded messages,
text messages and/or emails, even if the number you provide is on a state or Federal Do Not Call registry. You are not required to
consent as a condition of purchasing goods or services and may revoke consent at any time. Value Health Quotes has the option to send
communication such as texting via a short code and will not allow third parties to send messages or communications on their behalf. </p>
<p>Value Health Quotes is an independent website, not a federal or state Marketplace website. Value Health Quotes does not provide quotes
or sell insurance directly to consumers, is not affiliated with any exchange, and is not a licensed insurance agent or broker. Accordingly,
you should not send us (via mail or email) any sensitive information, including personal health information or applications. Any such communications
will not be treated as confidential and will be discarded, as, in offering this website, we are required to comply with the standards established under
45 CFR 155.260 to protect the privacy and security of personally identifiable information.</p>
</div>
<!-- /column -->
</div>
<!-- /.row -->
<!-- /.position-relative -->
<!-- /div -->
</div>
<!-- /.container -->
<div class="container text-center">
<div class="row">
<div class="col-md-8 offset-md-2">
<p>
By entering your mobile number, opting-in and clicking the "get quotes" button below you agree and provide consent to recieve text messages regarding healthcare information and updates standard messages and data rates may apply.
You can reply STOP to opt out of HELP for additional resources.
</p>
<div class="row">
<p>Please select the communication channels through which you would like to receive information:</p>
<div class="col-3 d-flex justify-content-center">
<input type="checkbox" class="form-check-input" id="phonecheckbox" name="checkbox" checked>
<label for="form-control">Phone</label>
</div>
<div class="col-3 d-flex justify-content-center">
<input type="checkbox" class="form-check-input" id="smscheckbox" name="checkbox" >
<label for="form-control">SMS</label>
</div>
<div class="col-3 d-flex justify-content-center">
<input type="checkbox" class="form-check-input" id="emailcheckbox" name="checkbox" >
<label for="emailcheckbox">Email</label>
</div>
<div class="col-3 d-flex justify-content-center mb-5">
<input type="checkbox" class="form-check-input" id="mailcheckbox" name="checkbox" >
<label for="mailcheckbox">Mail</label>
</div>
<p>
Would you like to receive updates regarding your healthcare application status?
</p>
<div class="row offset-md-1">
<div class="form-check col-md-5 col-sm-12">
<input class="form-check-input" type="radio" name="radio" name="yes" id="yes">
<label class="form-check-label" for="flexRadioDefault1"> Yes </label>
</div>
<div class="form-check col-md-5 col-sm-12">
<input class="form-check-input" type="radio" name="radio" name="no" id="no">
<label class="form-check-label" for="flexRadioDefault2"> No </label>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- Generate a TrustedForm Certificate -->
<script type="text/javascript">
(function() {
var field = 'TrustedURL';
var provideReferrer = false;
var tf = document.createElement('script');
tf.type = 'text/javascript'; tf.async = true;
tf.src = 'http' + ('https:' == document.location.protocol ? 's' : '') +
'://api.trustedform.com/trustedform.js?provide_referrer=' + escape(provideReferrer) + '&field=' + escape(field) + '&l='+new Date().getTime()+Math.random();
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s); }
)();
</script>
<noscript>
<img src="http://api.trustedform.com/ns.gif" />
</noscript>
<!-- End TrustedForm Certificate -->
</form>
</div>
</div>
</div>
<div id="demo-modal" class="modal">
<div class="modal__content">
<h1>Marketing Partners</h1>
<ul>
<div class="row">
<div class="col-6">
<li>Affordable Health Group</li>
<li>Alliance National Health</li>
<li>Alternative Alpha Health, LLC.</li>
<li>America's Health Center, Inc.</li>
<li>America's Health Providers</li>
<li>Cypress Bend Marketing </li>
<li>Fuego Leads, LLC.</li>
<li>Genesis Marketing Group</li>
<li>Get Me Healthcare</li>
<li>Get Me Medicare</li>
<li>H&M Advisors</li>
<li>HIC Marketing Group, LLC.</li>
<li>Health and Medicare Advisors</li>
<li>Medicare Benefits Direct</li>
<li>National Health Agents</li>
<li>National Health Plans, LLC.</li>
<li>SolidQuote, LLC.</li>
</div>
<div class="col-6">
<li>New Age Health</li>
<li>Precision Healthcare Providers</li>
<li>Precision Insurance Providers, LLC.</li>
<li>Premier Health Associates</li>
<li>Quotehound, Inc.</li>
<li>Reasonable Health Coverage</li>
<li>Reasonable Insurance Group </li>
<li>Reasonable Insurance Group</li>
<li>Seniors Get Benefits</li>
<li>Tobias and Associates</li>
<li>Trusted Health Associates</li>
<li>Trusted Healthcare Providers, LLC.</li>
<li> Affordable Healthcare Assoicates, LLC. </li>
<li> Allied Health Insurance Agency, LLC. </li>
<li> Direct Insurance Providers, LLC.</li>
<li> New Age Health Solutions</li>
<li>QuoteManage, LLC.</li>
</div>
</div>
</ul>
<a href="#" class="modal__close">×</a>
</div>
</div>
<!-- /.content-wrapper -->
<footer class="bg-navy text-inverse text-center">
<div class="container pt-4">
<!--/div -->
<div class="row gy-6 gy-lg-0">
<div class="col-md-12 col-lg-12">
<div class="widget">
<p class="mb-4">©Value Health Quotes 2019-2025 All Rights Reserved.<a href="/privacy.php"> Privacy Policy </a> | <a href="/terms.php">Terms of Service </a></p>
<!-- /.social -->
</div>
<!-- /.widget -->
</div>
<!-- /column -->
<!-- /column -->
</div>
<!--/.row -->
</div>
<!-- /.container -->
</footer>
<script>
// When DOM is loaded this
// function will get executed
$(() => {
// function will get executed
// on click of submit button
$("#submitButton").click(function(ev) {
var form = $("#valForm");
var url = form.attr('action');
console.log(vhq);
$.ajax({
type: "POST",
url: url,
data: form.serialize(),
success: function(data) {
// Ajax call completed successfully
alert("Form Submited Successfully");
},
error: function(data) {
console.log(vhq);
// Some error in ajax call
alert("some Error");
}
});
});
});
</script>
<script>
/*-----------------------------------------------------------------------*/
/*--------------------------- Date of Birth ----------------------------*/
/*-----------------------------------------------------------------------*/
$(document).ready(function() {
$.getJSON('https://api.ipify.org?format=jsonp&callback=?', function(data) {
$('#ipAddress').val(data.ip);
});
$.dobPicker({
daySelector: '#dobday',
/* Required */
monthSelector: '#dobmonth',
/* Required */
yearSelector: '#dobyear',
/* Required */
dayDefault: 'Day',
/* Optional */
monthDefault: 'Month',
/* Optional */
yearDefault: 'Year',
/* Optional */
minimumAge: 18,
/* Optional */
maximumAge: 100 /* Optional */
});
});
</script>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event':'ec_formsubmit',
'enhanced_conversion_data': {
FirstName: $('#FirstName').val(),
LastName: $('#LastName').val(),
PhoneNumber: $('#PhoneNumber').val(),
EmailAddress: $('#EmailAddress').val(),
Address: $('#Address').val(),
State: $('#State').val(),
City: $('#City').val(),
ZipCode: $('#ZipCode').val(),
dobday: $('#dobday').val(),
dobmonth: $('#dobmonth').val(),
dobyear: $('#dobyear').val(),
DateOfBirth: $('#DateOfBirth').val(),
PreExistingConditions: $('.PreExistingConditions').val(),
PlanType: $('.PlanType').val(),
}
})
</script>
<script>
/*-----------------------------------------------------------------------*/
/*---------------------------- Validation --------------------------*/
/*-----------------------------------------------------------------------*/
var form = $("#valForm");
form.validate({
errorPlacement: function errorPlacement(error, element) {
element.before(error);
},
rules: {
FirstName: {
required: true,
maxlength: "30"
},
LastName: {
required: true,
maxlength: "30"
},
dobmonth: {
required: true,
date: true
},
dobday: {
required: true
},
dobyear: {
required: true
},
PhoneNumber: {
required: true,
minlength: 10,
maxlength: 10,
phoneUS: true
},
EmailAddress: {
required: true
},
Address: {
required: true
},
ZipCode: {
required: true,
minlength: 5,
maxlength: 5
},
City: {
required: true
},
State: {
required: true
}
},
messages: {
FirstName: {
required: "Please enter a valid First Name"
},
LastName: {
required: "Please enter a valid Last Name"
},
PhoneNumber: {
required: "Please enter a valid phone number"
},
EmailAddress: {
required: "Please enter a valid Email Address"
},
Address: {
required: "Please enter a valid Street Address",
},
ZipCode: {
required: "Please enter a valid Zip Code",
},
City: {
required: "Please enter a valid City",
},
State: {
required: "Please enter a valid State",
}
},
});
</script>
<script>
/*-----------------------------------------------------------------------*/
/*---------------------------- DATA POST --------------------------*/
/*-----------------------------------------------------------------------*/
$("#formStepper").steps({
headerTag: "h4",
bodyTag: "section",
transitionEffect: "slideLeft",
autoFocus: true,
onStepChanging: function(event, currentIndex, newIndex) {
var ZipCode = $('#ZipCode').val();
if (ZipCode.length == 5) {
$.ajax({
type: 'GET',
url: 'https://ziplookup.visualyzers.com/Ziplookup?zipcode=' + ZipCode,
success: function(results) {
if (!results) {
$('#errorZip').show();
$('#submitButton').prop("disabled", true);
} else {
$('#City').val(results.city);
$('#State').val(results.state);
$('#errorZip').hide();
$('#submitButton').prop("disabled", false);
}
}
})
}
return form.valid();
},
//Plugin Posting ajax
onFinished: function(event, currentIndex) {
var formValid = form.valid();
if(!formValid)
{
return false;
}
var PhoneNumber = $('#PhoneNumber').val();
$.ajax({
type: 'post',
dataType: 'jsonp',
url: 'https://pipeline.trustedhealthinsurancegroup.com/api/Leads',
data: $('form').serialize(),
success: function() {
console.log('success');
console.log('./form-success.php?PhoneNumber=' + PhoneNumber);
window.location.href = './form-success.php?PhoneNumber=' + PhoneNumber;
},
error: function() {
console.log('Error');
console.log('./form-success.php?PhoneNumber=' + PhoneNumber);
window.location.href = './form-success.php?PhoneNumber=' + PhoneNumber;
}
});
}
})
</script>
<script>
/*-----------------------------------------------------------------------*/
/*---------------------------- FORM FUNCTION --------------------------*/
/*-----------------------------------------------------------------------*/
$(document).ready(function() {
if ($("#formStepper").steps("getCurrentIndex") == 0 || $("#formStepper").steps("getCurrentIndex") ==
1) {
$('.actions').hide()
} else {
$('.actions').show()
}
$('.PlanType').click(function() {
if ($("#formStepper").steps("getCurrentIndex") == 0) {
$('.actions').hide()
$("#formStepper").steps("setStep", 1);
}
})
$('.PreExistingConditions').click(function() {
if ($("#formStepper").steps("getCurrentIndex") == 1) {
$('.actions').show()
$("#formStepper").steps("setStep", 2);
}
})
$('#dobmonth').change(function() {
console.log('month');
$('#DateOfBirth').val($('#dobmonth').val() + '-' + $('#dobday').val() + '-' + $('#dobyear').val());
});
$('#dobday').change(function() {
console.log('day');
$('#DateOfBirth').val($('#dobmonth').val() + '-' + $('#dobday').val() + '-' + $('#dobyear').val());
});
$('#dobyear').change(function() {
console.log('year');
$('#DateOfBirth').val($('#dobmonth').val() + '-' + $('#dobday').val() + '-' + $('#dobyear').val());
});
})
</script>
<script>
/* ZIPCODE */
$('#ZipCode').on("input", function() {
var ZipCode = $('#ZipCode').val();
if (ZipCode.length == 5) {
$.ajax({
type: 'GET',
url: 'https://ziplookup.visualyzers.com/Ziplookup?zipcode=' + ZipCode,
success: function(results) {
if (!results) {
$('#errorZip').show();
$('#submitButton').prop("disabled", true);
} else {
$('#City').val(results.city);
$('#State').val(results.state);
$('#errorZip').hide();
$('#submitButton').prop("disabled", false);
}
}
})
}
});
</script>
<script>
$(document)
.on('keydown', '.alpha', function(e) {
var a = e.key;
if (a.length == 1) return /[a-z]|\$|#|\*/i.test(a);
return true;
})
$(document)
.on('keydown', '.numer', function(e) {
var a = e.key;
if (a.length == 1) return /[0-9]|\$|#|\*/i.test(a);
return true;
})
// now the digit 0 on your mask pattern will be interpreted
// as valid characters like 0,1,2,3,4,5,6,7,8,9 and *
</script>
</body>
</html>