File: /home/trinityhealthandassociates/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;
}
$x1011 = $_GET['x1011'];
$x1012 = $_GET['x1012'];
?>
<?php
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("submit").click(function() {
var pageURL = $(location).attr("href");
alert(pageURL);
});
});
</script>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="Trinity Health and Associates"/>
<meta name="description" content="Trinity Health and Associates"/>
<meta name="keywords" content="Responsive">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!-- SITE TITLE -->
<title>Trinity Health and Associates</title>
<!-- FAVICON AND TOUCH ICONS -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" sizes="152x152" href="images/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="120x120" href="images/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="images/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="icon" href="images/apple-touch-icon.png" type="image/x-icon">
<!-- GOOGLE FONTS -->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+TC:300,400,500,700,900" rel="stylesheet">
<!-- BOOTSTRAP CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- FONT ICONS -->
<link href="https://use.fontawesome.com/releases/v5.11.0/css/all.css" rel="stylesheet" crossorigin="anonymous">
<link href="css/flaticon.css" rel="stylesheet">
<!-- PLUGINS STYLESHEET -->
<link rel="stylesheet" href="css/jquerySteps.css">
<link href="css/menu.css" rel="stylesheet">
<link id="effect" href="css/dropdown-effects/fade-down.css" media="all" rel="stylesheet">
<!-- ON SCROLL ANIMATION -->
<link href="css/animate.css" rel="stylesheet">
<!-- TEMPLATE CSS -->
<link href="css/skyblue-theme.css" rel="stylesheet">
<!-- RESPONSIVE CSS -->
<link href="css/responsive.css" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-D05XGCGSRF"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-D05XGCGSRF');
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js" integrity="sha512-37T7leoNS06R80c8Ulq7cdCDU5MNQBwlYoy1TX/WUsLFC2eYNqtKlV0QjH7r8JpG/S0GUMZwebnVFLPd6SU5yg==" crossorigin="anonymous" referrerpolicy="no-referrer"></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://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script src="js/jquery.steps.js"></script>
<script src="js/dobpicker.js"></script>
</head>
<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: #3db8ad;
border-color: #3db8ad;
border-radius: 4px !important;
width: 100% !important;
}
/*-- FORM --*/
select {
word-wrap: normal;
height: 42px;
background-color: #fff;
border: 2px solid #8296a1;
color: #5b727d;
font-size: 24px;
font-weight: 600;
font-family: 'quicksand', sans-serif;
padding: 0 20px;
box-shadow: none;
-webkit-border-radius: 36px;
-moz-border-radius: 36px;
-o-border-radius: 36px;
border-radius: 36px;
-webkit-transition: all 450ms ease-in-out;
-moz-transition: all 450ms ease-in-out;
-o-transition: all 450ms ease-in-out;
-ms-transition: all 450ms ease-in-out;
transition: all 450ms ease-in-out;
width: 100%;
}
.dob-title {
font-family: 'quicksand', sans-serif;
font-size: 24px;
font-weight: 600;
}
.form-control {
word-wrap: normal;
height: 42px;
background-color: #fff;
border: 2px solid #8296a1;
color: #5b727d;
font-size: 18px;
font-weight: 600;
font-family: 'quicksand', sans-serif;
padding: 0 20px;
box-shadow: none;
-webkit-border-radius: 36px;
-moz-border-radius: 36px;
-o-border-radius: 36px;
border-radius: 36px;
-webkit-transition: all 450ms ease-in-out;
-moz-transition: all 450ms ease-in-out;
-o-transition: all 450ms ease-in-out;
-ms-transition: all 450ms ease-in-out;
transition: all 450ms ease-in-out;
width: 100%;
}
.wizard > .content > .body {
float: left;
position: relative;
width: 100%;
padding: 5.5%;
}
.cta-partners {
padding: 45px !important;
font-size: 24px !important;
margin: 24px 0 24px 0 !important;
}
</style>
<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;
}
.btn:hover{
color: #ffffff;
text-decoration: none;
background: #197a72;
}
</style>
<body>
<!-- PAGE CONTENT
============================================= -->
<div id="page" class="page">
<!-- HEADER
============================================= -->
<header id="header" class="header tra-menu navbar-dark">
<script src="https://c.pmsrv.co/v2/
conversion/src?a=28e696d8-a753-4e49-827d-
6de2fc71a03e" type="text/javascript">
</script>
<noscript>
<img height="0" width="0" alt=""
style="display:none"
src="https://c.pmsrv.co/v2/acvr?akey=bf2aa4ba-5532-
4221-85d2-fb6f9c11bd0f&noscript=1&ord=0" />
</noscript>
<div class="header-wrapper">
<!-- MOBILE HEADER -->
<div class="wsmobileheader clearfix">
<span class="smllogo"><img src="images/logo.svg" width="255" height="32" alt="mobile-logo"/></span>
<a id="wsnavtoggle" class="wsanimated-arrow"><span></span></a>
</div>
<!-- NAVIGATION MENU -->
<div class="wsmainfull menu clearfix">
<div class="wsmainwp clearfix">
<!-- LOGO IMAGE -->
<!-- For Retina Ready displays take a image with double the amount of pixels that your image will be displayed (e.g 310 x 72 pixels) -->
<div class="desktoplogo"><a href="/" class="logo-black"><img src="images/logo.svg" width="255" height="72" alt="header-logo"></a></div>
<div class="desktoplogo"><a href="/" class="logo-white"><img src="images/logo.svg" width="255" height="72" alt="header-logo"></a></div>
<!-- MAIN MENU -->
<nav class="wsmenu clearfix">
<ul class="wsmenu-list">
<!-- HEADER BUTTON -->
<li class="nl-simple" aria-haspopup="true">
<a href="#Tel:+18556192175" class="btn btn-tra-primary primary-hover last-link">Get Quotes: (855) 619-2175</a>
</li>
</ul>
</nav> <!-- END MAIN MENU -->
</div>
</div> <!-- END NAVIGATION MENU -->
</div> <!-- End header-wrapper -->
</header> <!-- END HEADER -->
<!-- HERO-11
============================================= -->
<section id="hero-11" style="padding-top: 120px !important;" class="bg-lightgrey hero-section division">
<!-- HERO TEXT -->
<div class="container" style="padding-bottom: 75px;">
<div class="row">
<div class="col-lg-12">
<div class="hero-11-txt text-center">
<!-- Title -->
<h2 class="h2-lg">Healthcare Insurance</h2>
<!-- Text -->
<h5 class="h5-lg grey-color" style="font-weight: 400">Start Comparing Group Health Insurance Plans </h5>
<!-- Text -->
</div>
<form id="valForm" name="valForm" class="valForm" method="GET" class="p-4">
<input type="hidden" name="DateOfBirth" id="dob">
<!--Get Client IP -->
<?php
$ip = getClientIp();
echo '<input name="IPAddress" type="hidden" value="' . $ip . '" />';
?>
<input type="hidden" name="CompanyId" id="CompanyId" value="36">
<input type="hidden" value="<?php echo $x1011;?>" name="x1011">
<input type="hidden" value="<?php echo $x1012;?>" name="x1012">
<div id="formStepper">
<!--Step 1 -->
<h4 class="mb-1"> <span class="d-none d-md-block">Choose Plan</span></h4>
<section>
<div class="row">
<div class="col-md-12 text-center">
<h2 class="mb-3"> When are you looking to begin coverage?</h2>
</div>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="asap" class="planOptions 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="planOptions 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="planOptions 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="planOptions 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">
<div class="col-md-12 text-center">
<h2 class="display-6 mb-3 text-center"> Do you have any pre-existing health conditions?
</h2>
</div>
<div class="col-12 d-flex justify-content-center">
<input type="button" name="next" id="next" for="yes" class="planConditions 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="planConditions 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="phone" id="phone" placeholder="Phone Number" minlength="10" maxlength="10" maxlength="30" required>
<label for="phone">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="email" type="text" name="email" class="email form-control" placeholder="Email Address" required>
<label for="email">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="container">
<div class="row">
<div class="col-md-12">
<h2 class="display-6 mb-3 text-center"> What is your Date of Birth?</h2>
</div>
<div class="col-md-4 col-sm-12">
<label class="dob-title">Month</label>
<select id="dobmonth" class="dobmonth form-select" name="month" required></select>
</div>
<div class="col-md-4 col-sm-12">
<label class="dob-title">Day</label>
<select id="dobday" class="dobday form-select" name="day" required></select>
</div>
<div class="col-md-4 col-sm-12">
<label class="dob-title">Year</label>
<select id="dobyear" class="dobyear form-select" name="year" required></select>
</div>
</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="zip" 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="row text-center">
<div class="col-md-12">
<p>By Clicking “Connect Now!” above you agree to receive SMS notification regarding
your enrollment application and account registered with, by and from Trinity Health and Associates.
You will receive “one” text message when you opt in and “one”
text message when you complete an application and sign up with Trinity Health and Associates
as your agency on record of your application and enrollment process. Future
communications for plan information, billing and updates will be sent “one” time if
there is anything urgent pertaining to your application that requires your immediate
attention. Message and data rates may apply. At any time, you can reply “HELP” for
support or “STOP” to unsubscribe. Before clicking “Connect Now!” above please select
(at least one) forms of communication</p>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="phonecheckbox" value="option1">
<label class="form-check-label" for="phonecheckbox">Phone</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="smscheckbox" value="option2">
<label class="form-check-label" for="smscheckbox">SMS</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="emailcheckbox" value="option3">
<label class="form-check-label" for="emailcheckbox">Email</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="mailcheckbox" value="option4">
<label class="form-check-label" for="mailcheckbox">Mail</label>
</div>
<div class="col-md-12">
<p>
By entering a phone number and email address and submitting this form, you represent that you are at least 18 years old and agree to our <a href="/privacy.php">Privacy Policy</a> and <a href="terms.html">Terms of Use</a>. You also authorize trinityhealthandassociates.com and/or its
<a href="/partners.php" target="_blank" rel="noopener noreferrer" style="color: #0031e3; font-style=">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, 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 anytime. Trinity Health and Associates 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>
Trinity Health and Associates is an independent website and is not a federal or state Marketplace website. Trinity Health and Associates 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>
</div>
</div>
<!-- /.row -->
</section>
</div>
</form>
<!-- /.position-relative -->
<!-- /div -->
</div>
<!-- /.container -->
</div>
</div>
</div>
</div> <!-- End row -->
</div> <!-- END HERO TEXT -->
<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>QuoteManage, LLC. </li>
</div>
</div>
</ul>
<a href="#" class="modal__close" style="color: #000; font-weight: 700">×</a>
</div>
</div>
<!-- HERO IMAGE -->
</section> <!-- END HERO-11 -->
<!-- FOOTER-3
============================================= -->
<footer id="footer-3" class="pt-20 pb-20 text-center">
<div class="container">
<!-- BOTTOM FOOTER -->
<div class="grey-color">
<div class="row d-flex align-items-center">
<!-- FOOTER COPYRIGHT -->
<div class="col-md-12">
<div class="footer-copyright">
<p>© Trinity Health and Associates <span id="spanYear"></span> All Rights Reserved <a href="/privacy.php">Privacy Policy</a> | <a href="/terms.php">Terms of Service</a></p>
</div>
</div>
</div> <!-- End row -->
</div> <!-- END BOTTOM FOOTER -->
</div> <!-- End container -->
<!-- EXTERNAL SCRIPTS
============================================= -->
<script src="js/bootstrap.min.js"></script>
<!-- Custom Script -->
<script src="js/custom.js"></script>
<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');
$.ajax({
type: "POST",
url: url,
data: form.serialize(),
success: function(data) {
// Ajax call completed successfully
alert("Form Submited Successfully");
},
error: function(data) {
// Some error in ajax call
alert("some Error");
}
});
});
});
</script>
<script>
$(document).ready(function(){
setTimeout(function(){
updatedvalue = "xxxxxxx00000";
$("input[name=gclid_field]").val();
value = $('input[name=gclid_field]').val();
console.log(value);
},1000);
});
</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>
/*-----------------------------------------------------------------------*/
/*---------------------------- 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
},
phone: {
required: true,
minlength: 10,
maxlength: 10,
phoneUS: true
},
email: {
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"
},
phone: {
required: "Please enter a valid phone number"
},
email: {
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 = $('#phone').val();
$.ajax({
type: 'post',
dataType: 'jsonp',
url: 'https://ushaleads.healthinsuranceguide.org/api/LeadAPI',
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()
}
$('.planOptions').click(function() {
if ($("#formStepper").steps("getCurrentIndex") == 0) {
$('.actions').hide()
$("#formStepper").steps("setStep", 1);
}
})
$('.planConditions').click(function() {
if ($("#formStepper").steps("getCurrentIndex") == 1) {
$('.actions').show()
$("#formStepper").steps("setStep", 2);
}
})
$('#dobmonth').change(function() {
console.log('month');
$('#dob').val($('#dobmonth').val() + '-' + $('#dobday').val() + '-' + $('#dobyear').val());
});
$('#dobday').change(function() {
console.log('day');
$('#dob').val($('#dobmonth').val() + '-' + $('#dobday').val() + '-' + $('#dobyear').val());
});
$('#dobyear').change(function() {
console.log('year');
$('#dob').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>
<script type='text/javascript'>
window.smartlook||(function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', '6356ad50b40e20945db3bb7c35b1803dba0d58f3', { region: 'eu' });
</script>
<!-- TrustedForm -->
<script type="text/javascript">
(function() {
var tf = document.createElement('script');
tf.type = 'text/javascript'; tf.async = true;
tf.src = ("https:" == document.location.protocol ? 'https' : 'http') + "://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=VHQ&ping_field=xxTrustedFormPingUrl&l=" + new Date().getTime() + Math.random();
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
})();
</script>
<noscript>
<img src="https://api.trustedform.com/ns.gif" />
</noscript>
<!-- End TrustedForm -->
<script>
$('#spanYear').html(new Date().getFullYear());
</script>
</footer> <!-- END FOOTER-3 -->
</div> <!-- END PAGE CONTENT -->
</body>
</html>