<?php
// Define variables and set to empty values
include('./Secure/Cred.php');
$plnbanda='';
$plnbandb='';
$plntpa='';
$plnbandc='';
$plnbandd='';
$Providerval='Choose Provider';
$xdogroupoplan='Family';
$xdogroupoplan2='Individual';
$grp = 'Employee ID';
$xdoreadonly='';
$reqicon='';
$formreqrequired='form-input';
$classreq='form-line';
$cmpvalu='Health Assur';
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    $cmpxlink = trim(strtoupper($_GET["cllocation"]));
}

$m_queues = conn("SELECT * FROM (`web_app_enrollment_form`) WHERE `link`='".$cmpxlink."' LIMIT 1;");
while(list($idx,$companyx,$linkx, $company_codex, $groupplanx, $statux) = mysqli_fetch_array($m_queues,MYSQLI_NUM))
{       
    $cmpvalu=$companyx;     
    $lnkvalu=$linkx;
    //$xdogroupoplan=$groupplanx;
    $comcod = $company_codex;
    $comstatus = $statux;
}

    if ($comstatus == "inactive") {
        header("Location: ./inactive.html");
        exit(); // Make sure to exit after redirecting
    } elseif ($cmpvalu == "Health Assur") {
        header("Location: ./invalid_link.html");
        exit(); // Make sure to exit after redirecting
    }


    
	$m_queues1 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'TPA%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues1,MYSQLI_NUM))
	{		
	$plntpa.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues2 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'BANDA%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues2,MYSQLI_NUM))
	{		
	$plnbanda.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues3 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'BANDB%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues3,MYSQLI_NUM))
	{		
	$plnbandb.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues4 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'BANDC%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues4,MYSQLI_NUM))
	{		
	$plnbandc.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues5 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'BANDD%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues5,MYSQLI_NUM))
	{		
	$plnbandd.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues6 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'BRIDGEGAP%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues6,MYSQLI_NUM))
	{		
	$plnbridgegap.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues7 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'CHANGEDFOUNDATION%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues7,MYSQLI_NUM))
	{		
	$changedfoundation .='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues8 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'TINCAN_PLATINUM%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues8,MYSQLI_NUM))
	{		
	$platinumtincan .='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues9 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'TINCAN_GOLDPLUS%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues9,MYSQLI_NUM))
	{		
	$goldplustincan .='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues10 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'TESTB%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues9,MYSQLI_NUM))
	{		
	$bandtest .='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues11 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'IDLP%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues11,MYSQLI_NUM))
	{		
	$plnidlp.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	$m_queues12 = conn("SELECT state, location, provider_name FROM (`web_app_provider_list`) WHERE `provider_category` like 'IDLC%';");
	while(list($statex,$locationx,$provider_namex) = mysqli_fetch_array($m_queues12,MYSQLI_NUM))
	{		
	$plnidlc.='<option value="'.$statex.' - '.$locationx.' - '.$provider_namex.'">'.$statex.' - '.$locationx.' - '.$provider_namex.'</option>';	
	
	}
	
	
include('./customization.php');

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html class="supernova"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="alternate" type="application/json+oembed" href="https://www.jotform.com/oembed/?format=json&amp;url=https%3A%2F%2Fform.jotform.com%2F202932287096562" title="oEmbed Form">
<link rel="alternate" type="text/xml+oembed" href="https://www.jotform.com/oembed/?format=xml&amp;url=https%3A%2F%2Fform.jotform.com%2F202932287096562" title="oEmbed Form">
<meta property="og:title" content="Online Enrollee Registration Form" >
<meta property="og:url" content="https://healthassur.com" >
<meta property="og:description" content="Please click the link to complete this form." >
<meta name="slack-app-id" content="AHNMASS8M">
<meta property="og:image" content="https://healthassur.com/enrollment/images/Red-logo.png" />
<link rel="shortcut icon" href="https://cdn.jotfor.ms/assets/img/favicons/favicon-2021-light%402x.pnfg">
<script>
          var favicon = document.querySelector('link[rel="shortcut icon"]');
          window.isDarkMode = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches);
          if(favicon && window.isDarkMode) {
              favicon.href = favicon.href.replaceAll('favicon-2021-light%402x.pfng', 'favicon-2021-dark%402x.pnfg');
          }
      </script><link rel="canonical" href="https://form.jotform.com/202932287096562" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=1" />
<meta name="HandheldFriendly" content="true" />
<title>Online Enrollee Registration Portal</title>
<style type="text/css">@media print{.form-section{display:inline!important}.form-pagebreak{display:none!important}.form-section-closed{height:auto!important}.page-section{position:initial!important}}</style>
<link id="custom-font" type="text/css" rel="stylesheet" href="//cdn.jotfor.ms/fonts/?family=Inter" />
<link type="text/css" rel="stylesheet" href="https://cdn01.jotfor.ms/themes/CSS/defaultV2.css?v=1ef91ab
"/>
<link type="text/css" rel="stylesheet" href="https://cdn02.jotfor.ms/themes/CSS/548b1325700cc48d318b4567.css?v=3.3.41599&themeRevisionID=6410387c373563082d0aa10a"/>


<!--CSS LINK-->
<link rel="stylesheet" href="style.css">

<script src="https://cdn02.jotfor.ms/static/prototype.forms.js?3.3.41599" type="text/javascript"></script>
<script src="https://cdn03.jotfor.ms/static/jotform.forms.js?3.3.41599" type="text/javascript"></script>
<script src="https://cdn01.jotfor.ms/js/vendor/jquery-1.8.0.min.js?v=3.3.41599" type="text/javascript"></script>
<script defer src="https://cdn02.jotfor.ms/js/vendor/maskedinput.min.js?v=3.3.41599" type="text/javascript"></script>
<script defer src="https://cdn03.jotfor.ms/js/vendor/jquery.maskedinput.min.js?v=3.3.41599" type="text/javascript"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/punycode/1.4.1/punycode.js"></script>
<script src="https://cdn01.jotfor.ms/js/vendor/imageinfo.js?v=3.3.41599" type="text/javascript"></script>
<script src="./fileuploader.js"></script>
<script src="https://cdn03.jotfor.ms/js/payments/validategateways.js?v=3.3.41599" type="text/javascript"></script>
<script type="text/javascript">	JotForm.newDefaultTheme = false;
	JotForm.extendsNewTheme = true;
	JotForm.singleProduct = false;
	JotForm.newPaymentUIForNewCreatedForms = false;
	JotForm.newPaymentUI = true;

   JotForm.setConditions([{"action":[{"id":"action_1683541929764","isError":false,"visibility":"Hide","field":"116"},{"id":"action_0_1683541928219","visibility":"Show","isError":false,"field":"117"}],"id":"1683541818438","index":"0","link":"Any","priority":"0","terms":[{"id":"term_0_1683541928219","field":"106","operator":"equals","value":"Individual","isError":false}],"type":"field"}]);	JotForm.submitError="jumpToFirstError";

	JotForm.init(function(){
	/*INIT-START*/
if (window.JotForm && JotForm.accessible) $('input_118').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_98').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_4').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_26').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_27').setAttribute('tabindex',0);
      JotForm.setPhoneMaskingValidator( 'input_23_', '\u0028\u0023\u0023\u0023\u0029 \u0023\u0023\u0023\u002d\u0023\u0023\u0023\u0023' );
if (window.JotForm && JotForm.accessible) $('input_110').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_29').setAttribute('tabindex',0);
      setTimeout(function() {
          $('input_24').hint('ex: myname@example.com');
       }, 20);
if (window.JotForm && JotForm.accessible) $('input_36').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_37').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_38').setAttribute('tabindex',0);
      JotForm.setPhoneMaskingValidator( 'input_41_', '\u0028\u0023\u0023\u0023\u0029 \u0023\u0023\u0023\u002d\u0023\u0023\u0023\u0023' );
if (window.JotForm && JotForm.accessible) $('input_111').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_50').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_51').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_52').setAttribute('tabindex',0);
      JotForm.setPhoneMaskingValidator( 'input_54_', '\u0028\u0023\u0023\u0023\u0029 \u0023\u0023\u0023\u002d\u0023\u0023\u0023\u0023' );
if (window.JotForm && JotForm.accessible) $('input_112').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_60').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_61').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_62').setAttribute('tabindex',0);
      JotForm.setPhoneMaskingValidator( 'input_64_', '\u0028\u0023\u0023\u0023\u0029 \u0023\u0023\u0023\u002d\u0023\u0023\u0023\u0023' );
if (window.JotForm && JotForm.accessible) $('input_113').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_69').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_70').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_71').setAttribute('tabindex',0);
      JotForm.setPhoneMaskingValidator( 'input_73_', '\u0028\u0023\u0023\u0023\u0029 \u0023\u0023\u0023\u002d\u0023\u0023\u0023\u0023' );
if (window.JotForm && JotForm.accessible) $('input_114').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_78').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_79').setAttribute('tabindex',0);
if (window.JotForm && JotForm.accessible) $('input_80').setAttribute('tabindex',0);
      JotForm.setPhoneMaskingValidator( 'input_82_', '\u0028\u0023\u0023\u0023\u0029 \u0023\u0023\u0023\u002d\u0023\u0023\u0023\u0023' );
if (window.JotForm && JotForm.accessible) $('input_115').setAttribute('tabindex',0);
      setTimeout(function() {
          JotForm.initMultipleUploads();
      }, 2);
	/*INIT-END*/
	});

   
</script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css" />
    <style>
        .choices { width: 380px; }
    </style>
</head>
<body>
<form class="jotform-form" action="./addnew.php" method="post" enctype="multipart/form-data" name="form_202932287096562" id="202932287096562" accept-charset="utf-8" autocomplete="on"><input type="hidden" name="formID" value="202932287096562" />

    <input type="hidden" id="JWTContainer" value="" /><input type="hidden" id="cardinalOrderNumber" value="" />
  <div role="main" class="form-all">
    <ul class="form-section page-section">
      <li class="form-line" data-type="control_image" id="id_105">
        <div id="cid_105" class="form-input-wide" data-layout="full">
          <div style="text-align:center"><img alt="Image" loading="lazy" class="form-image" style="border:0" src=images/Red-logo.png tabindex="0" height="212px" width="508px" data-component="image" /></div>
        </div>
      </li>
      <li id="cid_19" class="form-input-wide" data-type="control_head">
        <div class="form-header-group  header-default">
          <div class="header-text httal htvam">
            <h2 id="header_19" class="form-header" data-component="header"><?php echo $cmpvalu;?> Registration Form</h2>
            <div id="subHeader_19" class="form-subHeader">Please fill the form below indicating your personal details, preferred plan and provider. We will get back soon to you for more updates.</div>
          </div>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_48">
        <div id="cid_48" class="form-input-wide" data-layout="full">
          <div id="text_48" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: center;"><strong style="text-align: center;"><span style="font-size: 18pt; color: #0000ff;"><strong><strong>PRINCIPAL</strong></strong></span></strong></p>
          </div>
        </div>
      </li>
      <li class="form-line always-hidden" data-type="control_textbox" id="id_118"><label class="form-label form-label-left form-label-auto" id="label_118" for="input_118"> Enrollment SerialNo </label>
        <div id="cid_118" class="form-input always-hidden" data-layout="half"> <input type="text" id="input_118" name="q118_enrollmentSerialno" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" data-component="textbox" aria-labelledby="label_118" /> </div>
        <div id="cid_118" class="form-input always-hidden" data-layout="half"> <input type="text" id="input_118b" name="q118_enrollmentSerialno" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" data-component="textbox" aria-labelledby="label_118" /> </div>

      </li>
      <li class="form-line jf-required" data-type="control_textbox" id="id_98"><label class="form-label form-label-left form-label-auto" id="label_98" for="input_98"> Company Name<span class="form-required">*</span> </label>
        <div id="cid_98" class="form-input jf-required" data-layout="half"> <input type="text" id="input_98" name="q98_companyName" data-type="input-textbox" class="form-readonly form-textbox validate[required]" data-defaultvalue="FEDERAL INLAND REVENUE SERVICE (FIRS)" style="width:310px" size="310" value="<?php echo $cmpvalu;?>" tabindex="-1" data-component="textbox" aria-labelledby="label_98" readonly="" required="" /> </div>
      </li>
      <li class="form-line jf-required" data-type="control_textbox" id="id_4"><label class="form-label form-label-left form-label-auto" id="label_4" for="input_4"> Surname<span class="form-required">*</span> </label>
        <div id="cid_4" class="form-input jf-required" data-layout="half"> <input type="text" id="input_4" name="q4_surname" data-type="input-textbox" class="form-textbox validate[required]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_4" required="" /> </div>
      </li>
      <li class="form-line jf-required" data-type="control_textbox" id="id_26"><label class="form-label form-label-left form-label-auto" id="label_26" for="input_26"> First Name<span class="form-required">*</span> </label>
        <div id="cid_26" class="form-input jf-required" data-layout="half"> <input type="text" id="input_26" name="q26_firstName" data-type="input-textbox" class="form-textbox validate[required]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_26" required="" /> </div>
      </li>
      <li class="form-line" data-type="control_textbox" id="id_27"><label class="form-label form-label-left form-label-auto" id="label_27" for="input_27"> Middle Name </label>
        <div id="cid_27" class="form-input" data-layout="half"> <input type="text" id="input_27" name="q27_middleName" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_27" /> </div>
      </li>
      <li class="form-line jf-required" data-type="control_dropdown" id="id_22"><label class="form-label form-label-left form-label-auto" id="label_22" for="input_22"> Gender<span class="form-required">*</span> </label>
        <div id="cid_22" class="form-input jf-required" data-layout="half"> <select class="form-dropdown validate[required]" id="input_22" name="q22_gender" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Male">Male</option>
            <option value="Female">Female</option>
            
          </select> </div>
      </li>
      <li class="form-line jf-required" data-type="control_textbox" id="id_23"><label class="form-label form-label-left form-label-auto" id="label_23" for="input_23"> Phone Number<span class="form-required">*</span> </label>
        <div id="cid_23" class="form-input jf-required" data-layout="half"> <input type="text" id="input_23_full" name="q23_phoneNumber23" data-type="input-textbox" class="form-textbox validate[required]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_23" /> </div>
      </li>
      <li class="form-line jf-required" data-type="control_email" id="id_24"><label class="form-label form-label-left form-label-auto" id="label_24" for="input_24"> Email Address<span class="form-required">*</span> </label>
        <div id="cid_24" class="form-input jf-required" data-layout="half"> <input type="email" id="input_24" name="q24_emailAddress" data-type="input-textbox" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_24" /> </div>
      </li>
     <!-- <li class="form-line jf-required" data-type="control_email" id="id_24"><label class="form-label form-label-left form-label-auto" id="label_24" for="input_24"> E-mail Address<span class="form-required">*</span> </label>
        <div id="cid_24" class="form-input jf-required" data-layout="half"> <span class="form-sub-label-container" style="vertical-align:top"><input type="email" id="input_24" name="q24_emailAddress" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder="ex: myname@example.com" data-component="email" aria-labelledby="label_24 sublabel_input_24" /><label class="form-sub-label" for="input_24" id="sublabel_input_24" style="min-height:13px" aria-hidden="false">example@example.com</label></span> </div>
      </li> -->
      <li class="form-line jf-required" data-type="control_birthdate" id="id_9"><label class="form-label form-label-left form-label-auto" id="label_9" for="input_9"> Date of Birth<span class="form-required">*</span> </label>
        <div id="cid_9" class="form-input jf-required" data-layout="full">
          <div data-wrapper-react="true"><span class="form-sub-label-container" style="vertical-align:top"><select name="q9_dateOf[day]" id="input_9_day" class="form-dropdown validate[required]" data-component="birthdate-day" aria-labelledby="label_9 sublabel_9_day">
                <option></option>
                <option value="01">1</option>
                <option value="02">2</option>
                <option value="03">3</option>
                <option value="04">4</option>
                <option value="05">5</option>
                <option value="06">6</option>
                <option value="07">7</option>
                <option value="08">8</option>
                <option value="09">9</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
                <option value="20">20</option>
                <option value="21">21</option>
                <option value="22">22</option>
                <option value="23">23</option>
                <option value="24">24</option>
                <option value="25">25</option>
                <option value="26">26</option>
                <option value="27">27</option>
                <option value="28">28</option>
                <option value="29">29</option>
                <option value="30">30</option>
                <option value="31">31</option>
              </select><label class="form-sub-label" for="input_9_day" id="sublabel_9_day" style="min-height:13px" aria-hidden="false">Day</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="q9_dateOf[month]" id="input_9_month" class="form-dropdown validate[required]" data-component="birthdate-month" aria-labelledby="label_9 sublabel_9_month">
                <option></option>
                <option value="01">January</option>
                <option value="02">February</option>
                <option value="03">March</option>
                <option value="04">April</option>
                <option value="05">May</option>
                <option value="06">June</option>
                <option value="07">July</option>
                <option value="08">August</option>
                <option value="09">September</option>
                <option value="10">October</option>
                <option value="11">November</option>
                <option value="12">December</option>
              </select><label class="form-sub-label" for="input_9_month" id="sublabel_9_month" style="min-height:13px" aria-hidden="false">Month</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="q9_dateOf[year]" id="input_9_year" class="form-dropdown validate[required]" data-component="birthdate-year" aria-labelledby="label_9 sublabel_9_year">
                <option></option>
                <option value="2023">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>
                <option value="2019">2019</option>
                <option value="2018">2018</option>
                <option value="2017">2017</option>
                <option value="2016">2016</option>
                <option value="2015">2015</option>
                <option value="2014">2014</option>
                <option value="2013">2013</option>
                <option value="2012">2012</option>
                <option value="2011">2011</option>
                <option value="2010">2010</option>
                <option value="2009">2009</option>
                <option value="2008">2008</option>
                <option value="2007">2007</option>
                <option value="2006">2006</option>
                <option value="2005">2005</option>
                <option value="2004">2004</option>
                <option value="2003">2003</option>
                <option value="2002">2002</option>
                <option value="2001">2001</option>
                <option value="2000">2000</option>
                <option value="1999">1999</option>
                <option value="1998">1998</option>
                <option value="1997">1997</option>
                <option value="1996">1996</option>
                <option value="1995">1995</option>
                <option value="1994">1994</option>
                <option value="1993">1993</option>
                <option value="1992">1992</option>
                <option value="1991">1991</option>
                <option value="1990">1990</option>
                <option value="1989">1989</option>
                <option value="1988">1988</option>
                <option value="1987">1987</option>
                <option value="1986">1986</option>
                <option value="1985">1985</option>
                <option value="1984">1984</option>
                <option value="1983">1983</option>
                <option value="1982">1982</option>
                <option value="1981">1981</option>
                <option value="1980">1980</option>
                <option value="1979">1979</option>
                <option value="1978">1978</option>
                <option value="1977">1977</option>
                <option value="1976">1976</option>
                <option value="1975">1975</option>
                <option value="1974">1974</option>
                <option value="1973">1973</option>
                <option value="1972">1972</option>
                <option value="1971">1971</option>
                <option value="1970">1970</option>
                <option value="1969">1969</option>
                <option value="1968">1968</option>
                <option value="1967">1967</option>
                <option value="1966">1966</option>
                <option value="1965">1965</option>
                <option value="1964">1964</option>
                <option value="1963">1963</option>
                <option value="1962">1962</option>
                <option value="1961">1961</option>
                <option value="1960">1960</option>
                <option value="1959">1959</option>
                <option value="1958">1958</option>
                <option value="1957">1957</option>
                <option value="1956">1956</option>
                <option value="1955">1955</option>
                <option value="1954">1954</option>
                <option value="1953">1953</option>
                <option value="1952">1952</option>
                <option value="1951">1951</option>
                <option value="1950">1950</option>
                <option value="1949">1949</option>
                <option value="1948">1948</option>
                <option value="1947">1947</option>
                <option value="1946">1946</option>
                <option value="1945">1945</option>
                <option value="1944">1944</option>
                <option value="1943">1943</option>
                <option value="1942">1942</option>
                <option value="1941">1941</option>
                <option value="1940">1940</option>
                <option value="1939">1939</option>
                <option value="1938">1938</option>
                <option value="1937">1937</option>
                <option value="1936">1936</option>
                <option value="1935">1935</option>
                <option value="1934">1934</option>
                <option value="1933">1933</option>
                <option value="1932">1932</option>
                <option value="1931">1931</option>
                <option value="1930">1930</option>
                <option value="1929">1929</option>
                <option value="1928">1928</option>
                <option value="1927">1927</option>
                <option value="1926">1926</option>
                <option value="1925">1925</option>
                <option value="1924">1924</option>
                <option value="1923">1923</option>
                <option value="1922">1922</option>
                <option value="1921">1921</option>
                <option value="1920">1920</option>
              </select><label class="form-sub-label" for="input_9_year" id="sublabel_9_year" style="min-height:13px" aria-hidden="false">Year</label></span></div>
        </div>
      </li>
      <li class="form-line jf-required" data-type="control_radio" id="id_106"><label class="form-label form-label-left form-label-auto" id="label_106" for="input_106"> Plan Category <span class="form-required">*</span> </label>
        <div id="cid_106" class="form-input jf-required" data-layout="full">
          <div class="form-single-column" role="group" aria-labelledby="label_106" data-component="radio"><span class="form-radio-item" style="clear:left"><span class="dragger-item"></span><input type="radio" aria-describedby="label_106" class="form-radio validate[required]" id="input_106_0" name="q106_groupOf" value="<?=$xdogroupoplan;?>" required="" />
           <label id="label_input_106_0" for="input_106_0"><?=$xdogroupoplan;?></label>  
           </span><span class="form-radio-item" style="clear:left"><span class="dragger-item"></span><input type="radio" aria-describedby="label_106" class="form-radio validate[required]" id="input_106_1" name="q106_groupOf" value="<?=$xdogroupoplan2;?>" required="" /> <label id="label_input_106_1" for="input_106_1">Individual</label></span></div>
        </div>
      </li>
      <li class="form-line jf-required" data-type="control_dropdown" id="id_30"><label class="form-label form-label-left form-label-auto" id="label_30" for="input_30"> Type of Plan<span class="form-required">*</span> </label>
        <div id="cid_30" class="form-input jf-required" data-layout="half"> <select class="form-dropdown validate[required]" id="input_30" name="q30_typeOf30" style="width:310px" data-component="dropdown" required="" aria-label="Type of Plan" onchange="updateHospitals()">
        <option value="">  </option>
            <?php echo $planinput30; ?>
          </select> </div>
      </li>
      <li class="form-line always-hidden" data-type="control_textbox" id="id_110"><label class="form-label form-label-left form-label-auto" id="label_110" for="input_110"> HMO ID </label>
        <div id="cid_110" class="form-input always-hidden" data-layout="half"> <input type="text" id="input_110" name="q110_hmoId" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="HA/<?php echo $comcod.'/';?>" data-component="textbox" aria-labelledby="label_110" /> </div>
        
      </li>
      <li class="form-line jf-required" data-type="control_address" id="id_20" data-compound-hint=",,,,Please Select,,Please Select,"><label class="form-label form-label-left form-label-auto" id="label_20" for="input_20_addr_line1"> Home Address<span class="form-required">*</span> </label>
        <div id="cid_20" class="form-input jf-required" data-layout="full">
          <div summary="" class="form-address-table jsTest-addressField">
            <div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-street-line jsTest-address-lineField"><span class="form-sub-label-container" style="vertical-align:top"><input type="text" id="input_20_addr_line1" name="q20_address[addr_line1]" class="form-textbox validate[required] form-address-line" data-defaultvalue="" autoComplete="section-input_20 address-line1" value="" data-component="address_line_1" aria-labelledby="label_20 sublabel_20_addr_line1" required="" /><label class="form-sub-label" for="input_20_addr_line1" id="sublabel_20_addr_line1" style="min-height:13px" aria-hidden="false">Street Address</label></span></span></div>
        
        <div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-street-line jsTest-address-lineField"><span class="form-sub-label-container" style="vertical-align:top"><input type="text" id="input_20_addr_line2" name="q20_address[addr_line2]" class="form-textbox form-address-line" data-defaultvalue="" autoComplete="section-input_20 address-line2" value="" data-component="address_line_2" aria-labelledby="label_20 sublabel_20_addr_line2" /><label class="form-sub-label" for="input_20_addr_line2" id="sublabel_20_addr_line2" style="min-height:13px" aria-hidden="false">Street Address Line 2</label></span></span></div>
                            <!-- <input type="text" id="input_20_state" name="q20_address[state]" class="form-textbox validate[required] form-address-state" data-defaultvalue="" autoComplete="section-input_20 address-level1" value="" data-component="state" aria-labelledby="label_20 sublabel_20_state" required="" /> -->
                </div>
      </li>
        <li class="form-line jf-required" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> State<span class="form-required">*</span> </label>
        <div id="cid_20" class="form-input jf-required" data-layout="full">
        <select class="form-dropdown validate[required]" id="input_20_state" onchange="updateHospitals()" name="q20_address[state]"
                            required>
                            <option selected disabled>Select State</option>
                            <option value="Abia">Abia</option>
                            <option value="Adamawa">Adamawa</option>
                            <option value="Abuja">Abuja</option>
                            <option value="AkwaIbom">Akwa Ibom</option>
                            <option value="Anambra">Anambra</option>
                            <option value="Bauchi">Bauchi</option>
                            <option value="Bayelsa">Bayelsa</option>
                            <option value="Benue">Benue</option>
                            <option value="Borno">Borno</option>
                            <option value="CrossRiver">Cross River</option>
                            <option value="Delta">Delta</option>
                            <option value="Ebonyi">Ebonyi</option>
                            <option value="Edo">Edo</option>
                            <option value="Ekiti">Ekiti</option>
                            <option value="Enugu">Enugu</option>
                            <option value="Gombe">Gombe</option>
                            <option value="Imo">Imo</option>
                            <option value="Jigawa">Jigawa</option>
                            <option value="Kaduna">Kaduna</option>
                            <option value="Kano">Kano</option>
                            <option value="Katsina">Katsina</option>
                            <option value="Kebbi">Kebbi</option>
                            <option value="Kogi">Kogi</option>
                            <option value="Kwara">Kwara</option>
                            <option value="Lagos">Lagos</option>
                            <option value="Nasarawa">Nasarawa</option>
                            <option value="Niger">Niger</option>
                            <option value="Ogun">Ogun</option>
                            <option value="Ondo">Ondo</option>
                            <option value="Osun">Osun</option>
                            <option value="Oyo">Oyo</option>
                            <option value="Plateau">Plateau</option>
                            <option value="Rivers">Rivers</option>
                            <option value="Sokoto">Sokoto</option>
                            <option value="Taraba">Taraba</option>
                            <option value="Yobe">Yobe</option>
                            <option value="Zamfara">Zamfara</option>
                        </select><label class="form-sub-label" for="input_20_state" id="sublabel_20_state" style="min-height:13px" aria-hidden="false">State</label></span></span>
            <!--<div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-zip-line jsTest-address-lineField "><span class="form-sub-label-container" style="vertical-align:top">
                
                
                <select class="form-dropdown validate[required]" name="q20_address[postal]" onchange="populatecity()" id="input_20_postal">
                            <option selected disabled>Select Local Government</option>
                        </select>
                        <script src="./statelga.js"></script>
                
                <label class="form-sub-label" for="input_20_postal" id="sublabel_20_postal" style="min-height:13px" aria-hidden="false">LGA</label></span></span></div>
          </div> -->

      
      
      

      <!-- <li class="form-line jf-required" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> City<span class="form-required">*</span> </label>
        <div id="cid_31" class="form-input jf-required" data-layout="half"> 
            <span class="form-sub-label-container" style="vertical-align:top">
            <select class=" form-readonly form-dropdown validate[required]" id="city" onchange="updateHospitals()" name="q20_address[city]" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="label_31 sublabel_input_31">
                        <script src="./city.js"></script>
                    </select>

      </li> -->
      <li class="form-line jf-required" data-type="control_dropdown" id="id_31">
            <label class="form-label form-label-left form-label-auto" id="label_31" for="input_31">
                Preferred Hospitals<span class="form-required">*</span>
            </label>
            <div id="cid_31" class="form-input jf-required" data-layout="half">
                <span class="form-sub-label-container" style="vertical-align:top">
                    <select class="form-readonly form-dropdown validate[required]" id="hospitalDropdown" name="q31_hospitalsx" style="width:310px" data-component="dropdown" required="" aria-labelledby="label_31 sublabel_input_31">
                        
                    </select>
                </span>
            </div>
        </li>

    <script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>
    <script>
        let hospitalChoices;

        document.addEventListener('DOMContentLoaded', function () {
            // Initialize Choices.js
            hospitalChoices = new Choices('#hospitalDropdown', {
                searchEnabled: true,
                placeholderValue: 'Choose a Provider',
                searchPlaceholderValue: 'Search for Provider.',
                shouldSort: true
            });
            
            

            // Update hospitals when the state changes
            document.getElementById('input_20_state').addEventListener('change', updateHospitals());
        });

        function updateHospitals() {
            var planType = document.getElementById('input_30').value;
            var state = document.getElementById('input_20_state').value;
            var hospitalDropdown = document.getElementById('hospitalDropdown');

            // Clear the hospital dropdown
            hospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

            if (state) {
                // Fetch the hospitals for the selected state
                fetch('get_hospitals.php?state=' + state + '&planType=' + planType)
                    .then(response => response.json())
                    .then(data => {
                        data.hospitals.forEach(provider_name => {
                            // Update hospital dropdown
                            var option = document.createElement('option');
                            option.value = provider_name;
                            option.text = provider_name;
                            hospitalDropdown.add(option);
                        });

                        // Reinitialize Choices.js
                        hospitalChoices.setChoices([{
                            label: 'Choose a Provider',
                            value: '',
                            selected: true,
                            disabled: true
                        }].concat(data.hospitals.map(hospital => ({
                            label: hospital,
                            value: hospital
                        }))), 'value', 'label', true);
                    })
                    .catch(error => console.error('Error fetching hospitals:', error));
            }
        }
    </script>
   
      <li class="form-line" data-type="control_textbox" id="id_29"><label class="form-label form-label-left form-label-auto" id="label_29" for="input_29"> <?=$grp;?> <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="cid_29" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="input_29" name="q29_employeeId" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_29" /> </div>
      </li>
      <li class="form-line jf-required" data-type="control_dropdown" id="id_genotype"><label class="form-label form-label-left form-label-auto" id="label_genotype" for="input_genotype"> Genotype<span class="form-required">*</span> </label>
        <div id="cid_genotype" class="form-input jf-required" data-layout="half"> <select class="form-dropdown validate[required]" id="input_genotype" name="q_genotype" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="AA">AA</option>
            <option value="AC">AC</option>
            <option value="AS">AS</option>
            <option value="CC">CC</option>
            <option value="SC">SC</option>
            <option value="SS">SS</option>
            
          </select> </div>
      </li>
      <li class="form-line jf-required" data-type="control_dropdown" id="id_bloodgroup"><label class="form-label form-label-left form-label-auto" id="label_bloodgroup" for="input_bloodgroup"> Blood Group<span class="form-required">*</span> </label>
        <div id="cid_bloodgroup" class="form-input jf-required" data-layout="half"> <select class="form-dropdown validate[required]" id="input_bloodgroup" name="q_bloodgroup" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="A+">A+</option>
            <option value="A-">A-</option>
            <option value="B+">B+</option>
            <option value="B-">B-</option>
            <option value="AB+">AB-</option>
            <option value="AB_">AB+</option>
            <option value="O+">O+</option>
            <option value="O-">O-</option>
            
          </select> </div>
      </li>
      <li class="form-line jf-required" data-type="control_textbox" id="id_allergies"><label class="form-label form-label-left form-label-auto" id="label_allergies" for="input_allergies"> Allergies<span class="form-required">*</span> </label>
        <div id="cid_allergies" class="form-input jf-required" data-layout="half"> <input type="text" id="input_allergies" name="q_allergies" data-type="input-textbox" class="form-textbox validate[required]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_allergies" /> </div>
      </li>
      
      <li class="form-line jf-required" data-type="control_dropdown" id="id_Preextcon"><label class="form-label form-label-left form-label-auto" id="label_Preextcon" for="input_Preextcon"> Any Pre-Existing Condition?<span class="form-required">*</span> </label>
        <div id="cid_Preextcon" class="form-input jf-required" data-layout="half"> <select class="form-dropdown validate[required]" id="input_Preextcon" name="q_Preextcon" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="id_Preextconans"><label class="form-label form-label-left form-label-auto" id="label_Preextconans" for="Preextconans"> If yes? Pre-Existing Condition <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="cid_Preextconans" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="input_Preextconans" name="q_Preextconans" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" eg. hypertension, diabetes, asthma , etc" data-component="textbox" aria-labelledby="label_Preextconans" /> </div>
      </li>
      
      <li class="form-line jf-required" data-type="control_dropdown" id="id_surgicalque"><label class="form-label form-label-left form-label-auto" id="label_surgicalque" for="input_surgicalque"> Any Surgical History?<span class="form-required">*</span> </label>
        <div id="cid_surgicalque" class="form-input jf-required" data-layout="half"> <select class="form-dropdown validate[required]" id="input_surgicalque" name="q_surgicalque" style="width:310px" data-component="dropdown" required="" aria-label="surgicalque">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="id_surgical"><label class="form-label form-label-left form-label-auto" id="label_surgical" for="input_surgical"> If yes? Surgical History<span class="form-required>"></span> </label>
        <div id="cid_surgical" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="input_surgical" name="q_surgical" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="label_surgical" /> </div>
      
       <li class="form-line jf-required" data-type="control_fileupload" id="id_99">
        <label class="form-label form-label-left form-label-auto" id="label_99" for="input_99">
          Passport
          <span class="form-required">
            *
          </span>
        </label>
        <div id="cid_99" class="form-input jf-required">
          <span class="form-sub-label-container" style="vertical-align:top">
            <input type="file" id="input_99" name="q99_passport" class="form-upload validate[required]" data-imagevalidate="yes" data-file-accept="jpg, jpeg, png, gif" data-file-maxsize="10240" data-file-minsize="0" data-file-limit="" data-component="fileupload" required="" />
            <label class="form-sub-label" for="input_99" style="min-height:13px" aria-hidden="false"> Select passport photo from your device. Kindly note that the Maximum passport size is 5mb </label>
          </span>
        </div>
      </li>
      
      
      <li class="form-line form-field-hidden" style="display:none;" data-type="control_button" id="id_117">
        <div id="cid_117" class="form-input-wide" data-layout="full">
          <div data-align="auto" class="form-buttons-wrapper form-buttons-auto   jsTest-button-wrapperField"><button id="input_117" type="submit" class="form-submit-button submit-button jf-form-buttons jsTest-submitField" data-component="button" onclick "process_form.php" data-content="">Submit</button></div>
        </div>
      </li>
      <li id="cid_116" class="form-input-wide" data-type="control_pagebreak">
        <div class="form-pagebreak" data-component="pagebreak">
          <div class="form-pagebreak-back-container"><button id="form-pagebreak-back_116" type="button" class="form-pagebreak-back  jf-form-buttons" data-component="pagebreak-back">Back</button></div>
          <div class="form-pagebreak-next-container"><button id="form-pagebreak-next_116" type="button" class="form-pagebreak-next  jf-form-buttons" data-component="pagebreak-next">Next</button></div>
          <div style="clear:both" class="pageInfo form-sub-label" id="pageInfo_116"></div>
        </div>
      </li>
    </ul>
    <ul class="form-section page-section" style="display:none;">
      <li class="form-line" data-type="control_divider" id="id_34">
        <div id="cid_34" class="form-input-wide" data-layout="full">
          <div class="divider" data-component="divider" style="border-bottom-width:1px;border-bottom-style:solid;border-color:#e6e6e6;height:1px;margin-left:0px;margin-right:0px;margin-top:5px;margin-bottom:5px"></div>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_35">
        <div id="cid_35" class="form-input-wide" data-layout="full">
          <div id="text_35" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: center;"><span style="font-size: 18pt; color: #0000ff;"><strong><strong>SPOUSE</strong></strong></span></p>
          </div>
        </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="spouseid_4"><label class="form-label form-label-left form-label-auto" id="spouselabel_4" for="spouseinput_4"> Surname </label>
        <div id="spousecid_4" class="form-input " data-layout="half"> <input type="text" id="spouseinput_4" name="spouseq4_surname" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="spouselabel_4" required="" /> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="spouseid_26"><label class="form-label form-label-left form-label-auto" id="spouselabel_26" for="spouseinput_26"> First Name </label>
        <div id="spousecid_26" class="form-input " data-layout="half"> <input type="text" id="spouseinput_26" name="spouseq26_firstName" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="spouselabel_26" required="" /> </div>
      </li>
      <li class="form-line" data-type="control_textbox" id="spouseid_27"><label class="form-label form-label-left form-label-auto" id="spouselabel_27" for="spouseinput_27"> Middle Name </label>
        <div id="spousecid_27" class="form-input" data-layout="half"> <input type="text" id="spouseinput_27" name="spouseq27_middleName" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="spouselabel_27" /> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="spouseid_22"><label class="form-label form-label-left form-label-auto" id="spouselabel_22" for="spouseinput_22"> Gender </label>
        <div id="spousecid_22" class="form-input " data-layout="half"> <select class="form-dropdown " id="spouseinput_22" name="spouseq22_gender" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Male">Male</option>
            <option value="Female">Female</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_email" id="spouseid_24"><label class="form-label form-label-left form-label-auto" id="spouselabel_24" for="spouseinput_24"> Email Address </label>
        <div id="spousecid_24" class="form-input " data-layout="half"> <input type="email" id="spouseinput_24" name="spouseq24_emailAddress" data-type="input-textbox" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="spouselabel_24" /> </div>
      </li>
      <li class="form-line " data-type="control_birthdate" id="spouseid_9"><label class="form-label form-label-left form-label-auto" id="spouselabel_9" for="spouseinput_9"> Date of Birth </label>
        <div id="spousecid_9" class="form-input " data-layout="full">
          <div data-wrapper-react="true"><span class="form-sub-label-container" style="vertical-align:top"><select name="spouseq9_dateOf[day]" id="spouseinput_9_day" class="form-dropdown " data-component="birthdate-day" aria-labelledby="spouselabel_9 subspouselabel_9_day">
                <option></option>
                <option value="01">1</option>
                <option value="02">2</option>
                <option value="03">3</option>
                <option value="04">4</option>
                <option value="05">5</option>
                <option value="06">6</option>
                <option value="07">7</option>
                <option value="08">8</option>
                <option value="09">9</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
                <option value="20">20</option>
                <option value="21">21</option>
                <option value="22">22</option>
                <option value="23">23</option>
                <option value="24">24</option>
                <option value="25">25</option>
                <option value="26">26</option>
                <option value="27">27</option>
                <option value="28">28</option>
                <option value="29">29</option>
                <option value="30">30</option>
                <option value="31">31</option>
              </select><label class="form-sub-label" for="spouseinput_9_day" id="subspouselabel_9_day" style="min-height:13px" aria-hidden="false">Day</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="spouseq9_dateOf[month]" id="spouseinput_9_month" class="form-dropdown " data-component="birthdate-month" aria-labelledby="spouselabel_9 subspouselabel_9_month">
                <option></option>
                <option value="01">January</option>
                <option value="02">February</option>
                <option value="03">March</option>
                <option value="04">April</option>
                <option value="05">May</option>
                <option value="06">June</option>
                <option value="07">July</option>
                <option value="08">August</option>
                <option value="09">September</option>
                <option value="10">October</option>
                <option value="11">November</option>
                <option value="12">December</option>
              </select><label class="form-sub-label" for="spouseinput_9_month" id="subspouselabel_9_month" style="min-height:13px" aria-hidden="false">Month</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="spouseq9_dateOf[year]" id="spouseinput_9_year" class="form-dropdown " data-component="birthdate-year" aria-labelledby="spouselabel_9 subspouselabel_9_year">
                <option></option>
                <option value="2023">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>
                <option value="2019">2019</option>
                <option value="2018">2018</option>
                <option value="2017">2017</option>
                <option value="2016">2016</option>
                <option value="2015">2015</option>
                <option value="2014">2014</option>
                <option value="2013">2013</option>
                <option value="2012">2012</option>
                <option value="2011">2011</option>
                <option value="2010">2010</option>
                <option value="2009">2009</option>
                <option value="2008">2008</option>
                <option value="2007">2007</option>
                <option value="2006">2006</option>
                <option value="2005">2005</option>
                <option value="2004">2004</option>
                <option value="2003">2003</option>
                <option value="2002">2002</option>
                <option value="2001">2001</option>
                <option value="2000">2000</option>
                <option value="1999">1999</option>
                <option value="1998">1998</option>
                <option value="1997">1997</option>
                <option value="1996">1996</option>
                <option value="1995">1995</option>
                <option value="1994">1994</option>
                <option value="1993">1993</option>
                <option value="1992">1992</option>
                <option value="1991">1991</option>
                <option value="1990">1990</option>
                <option value="1989">1989</option>
                <option value="1988">1988</option>
                <option value="1987">1987</option>
                <option value="1986">1986</option>
                <option value="1985">1985</option>
                <option value="1984">1984</option>
                <option value="1983">1983</option>
                <option value="1982">1982</option>
                <option value="1981">1981</option>
                <option value="1980">1980</option>
                <option value="1979">1979</option>
                <option value="1978">1978</option>
                <option value="1977">1977</option>
                <option value="1976">1976</option>
                <option value="1975">1975</option>
                <option value="1974">1974</option>
                <option value="1973">1973</option>
                <option value="1972">1972</option>
                <option value="1971">1971</option>
                <option value="1970">1970</option>
                <option value="1969">1969</option>
                <option value="1968">1968</option>
                <option value="1967">1967</option>
                <option value="1966">1966</option>
                <option value="1965">1965</option>
                <option value="1964">1964</option>
                <option value="1963">1963</option>
                <option value="1962">1962</option>
                <option value="1961">1961</option>
                <option value="1960">1960</option>
                <option value="1959">1959</option>
                <option value="1958">1958</option>
                <option value="1957">1957</option>
                <option value="1956">1956</option>
                <option value="1955">1955</option>
                <option value="1954">1954</option>
                <option value="1953">1953</option>
                <option value="1952">1952</option>
                <option value="1951">1951</option>
                <option value="1950">1950</option>
                <option value="1949">1949</option>
                <option value="1948">1948</option>
                <option value="1947">1947</option>
                <option value="1946">1946</option>
                <option value="1945">1945</option>
                <option value="1944">1944</option>
                <option value="1943">1943</option>
                <option value="1942">1942</option>
                <option value="1941">1941</option>
                <option value="1940">1940</option>
                <option value="1939">1939</option>
                <option value="1938">1938</option>
                <option value="1937">1937</option>
                <option value="1936">1936</option>
                <option value="1935">1935</option>
                <option value="1934">1934</option>
                <option value="1933">1933</option>
                <option value="1932">1932</option>
                <option value="1931">1931</option>
                <option value="1930">1930</option>
                <option value="1929">1929</option>
                <option value="1928">1928</option>
                <option value="1927">1927</option>
                <option value="1926">1926</option>
                <option value="1925">1925</option>
                <option value="1924">1924</option>
                <option value="1923">1923</option>
                <option value="1922">1922</option>
                <option value="1921">1921</option>
                <option value="1920">1920</option>
              </select><label class="form-sub-label" for="spouseinput_9_year" id="subspouselabel_9_year" style="min-height:13px" aria-hidden="false">Year</label></span></div>
        </div>
      </li>
      
      <li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> State</label>
  <div id="cid_20" class="form-input" data-layout="full">
  <select class="form-dropdown" id="spouseinput_20_state" onchange="updatespouseHospitals()" name="spouseq20_address[state]"
                      required>
                      <option selected disabled>Select State</option>
                      <option value="Abia">Abia</option>
                      <option value="Adamawa">Adamawa</option>
                      <option value="Abuja">Abuja</option>
                      <option value="AkwaIbom">Akwa Ibom</option>
                      <option value="Anambra">Anambra</option>
                      <option value="Bauchi">Bauchi</option>
                      <option value="Bayelsa">Bayelsa</option>
                      <option value="Benue">Benue</option>
                      <option value="Borno">Borno</option>
                      <option value="CrossRiver">Cross River</option>
                      <option value="Delta">Delta</option>
                      <option value="Ebonyi">Ebonyi</option>
                      <option value="Edo">Edo</option>
                      <option value="Ekiti">Ekiti</option>
                      <option value="Enugu">Enugu</option>
                      <option value="Gombe">Gombe</option>
                      <option value="Imo">Imo</option>
                      <option value="Jigawa">Jigawa</option>
                      <option value="Kaduna">Kaduna</option>
                      <option value="Kano">Kano</option>
                      <option value="Katsina">Katsina</option>
                      <option value="Kebbi">Kebbi</option>
                      <option value="Kogi">Kogi</option>
                      <option value="Kwara">Kwara</option>
                      <option value="Lagos">Lagos</option>
                      <option value="Nassarawa">Nassarawa</option>
                      <option value="Niger">Niger</option>
                      <option value="Ogun">Ogun</option>
                      <option value="Ondo">Ondo</option>
                      <option value="Osun">Osun</option>
                      <option value="Oyo">Oyo</option>
                      <option value="Plateau">Plateau</option>
                      <option value="Rivers">Rivers</option>
                      <option value="Sokoto">Sokoto</option>
                      <option value="Taraba">Taraba</option>
                      <option value="Yobe">Yobe</option>
                      <option value="Zamfara">Zamfara</option>
                  </select><label class="form-sub-label" for="input_20_state" id="sublabel_20_state" style="min-height:13px" aria-hidden="false">State</label></span></span>
      <!--<div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-zip-line jsTest-address-lineField "><span class="form-sub-label-container" style="vertical-align:top">
          
          
          <select class="form-dropdown validate[required]" name="q20_address[postal]" onchange="populatecity()" id="input_20_postal">
                      <option selected disabled>Select Local Government</option>
                  </select>
                  <script src="./statelga.js"></script>
          
          <label class="form-sub-label" for="input_20_postal" id="sublabel_20_postal" style="min-height:13px" aria-hidden="false">LGA</label></span></span></div>
    </div> -->





 <!--<li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> City </label>
  <div id="cid_31" class="form-input" data-layout="half"> 
      <span class="form-sub-label-container" style="vertical-align:top">
      <select class=" form-readonly form-dropdown" id="spousecity" onchange="updatespouseHospitals()" name="spouseq20_address[city]" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="label_31 sublabel_input_31">
                  <script src="./city.js"></script>
              </select>

</li> -->
      <li class="form-line " data-type="control_dropdown" id="spouseid_31"><label class="form-label form-label-left form-label-auto" id="spouselabel_31" for="spouseinput_31"> Preferred Hospitals </label>
        <div id="spousecid_31" class="form-input " data-layout="half"> 
            <span class="form-sub-label-container" style="vertical-align:top">
            <select class=" form-readonly form-dropdown select2" id="spouseinput_31x" name="spouseq31_hospitalsx" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="spouselabel_31 subspouselabel_spouseinput_31">
                      <!-- <datalist id="spouseinput_31b">
                      <option value="">
                      <option value=""> 
                    </datalist> -->
                    <option value "<?=$Providerval;?>" selected="" ><?=$Providerval;?> </option>
                
                </select>
            
            <label class="form-sub-label" for="spouseinput_31" id="subspouselabel_spouseinput_31" style="min-height:13px" aria-hidden="false">
                </label></span> 
            </div>
      </li>
      
      <script>
        let spouseHospitalChoices;

        document.addEventListener('DOMContentLoaded', function () {
            // Initialize Choices.js for spouse hospital dropdown
            spouseHospitalChoices = new Choices('#spouseinput_31x', {
                searchEnabled: true,
                searchPlaceholderValue: 'Search for a provider...',
                shouldSort: true
            });

            // Update hospitals when the state changes
            document.getElementById('spouseinput_20_state').addEventListener('change', updateSpouseHospitals);
        });

        function updateSpouseHospitals() {
            var planType = document.getElementById('input_30').value;
            var state = document.getElementById('spouseinput_20_state').value;
            var spouseHospitalDropdown = document.getElementById('spouseinput_31x');

            // Clear the spouse hospital dropdown
            spouseHospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

            if (state) {
                // Fetch the hospitals for the selected state
                fetch('get_hospitals.php?state=' + state + '&planType=' + planType)
                    .then(response => response.json())
                    .then(data => {
                        data.hospitals.forEach(provider_name => {
                            var option = document.createElement('option');
                            option.value = provider_name;
                            option.text = provider_name;
                            spouseHospitalDropdown.add(option);
                        });

                        // Reinitialize Choices.js for spouse hospital dropdown
                        spouseHospitalChoices.setChoices([{
                            label: 'Choose a Provider',
                            value: '',
                            selected: true,
                            disabled: true
                        }].concat(data.hospitals.map(hospital => ({
                            label: hospital,
                            value: hospital
                        }))), 'value', 'label', true);
                    })
                    .catch(error => console.error('Error fetching hospitals:', error));
            }
        }
    </script>

      
      <!--<script>
      
      function updatespouseHospitals() {
    var state = document.getElementById('spouseinput_20_state').value;
    var spouseHospitalDropdown = document.getElementById('spouseinput_31x');

    // Clear the hospital dropdown
    spouseHospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

    if (state) {
        // Fetch the hospitals for the selected state
        fetch('get_hospitals.php?state=' + state)
            .then(response => response.json())
            .then(data => {
                data.hospitals.forEach(provider_name => {

                    // Update spouse hospital dropdown
                    var spouseOption = document.createElement('option');
                    spouseOption.value = provider_name;
                    spouseOption.text = provider_name;
                    spouseHospitalDropdown.add(spouseOption);
                    
                });
            })
            .catch(error => console.error('Error fetching hospitals:', error));
    }
}
      
      </script> -->
      <li class="form-line " data-type="control_dropdown" id="spouseid_genotype"><label class="form-label form-label-left form-label-auto" id="spouselabel_genotype" for="spouseinput_genotype"> Genotype </label>
        <div id="spousecid_genotype" class="form-input " data-layout="half"> <select class="form-dropdown " id="spouseinput_genotype" name="spouseq_genotype" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="AA">AA</option>
            <option value="AC">AC</option>
            <option value="AS">AS</option>
            <option value="CC">CC</option>
            <option value="SC">SC</option>
            <option value="SS">SS</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="spouseid_bloodgroup"><label class="form-label form-label-left form-label-auto" id="spouselabel_bloodgroup" for="spouseinput_bloodgroup"> Blood Group </label>
        <div id="spousecid_bloodgroup" class="form-input " data-layout="half"> <select class="form-dropdown " id="spouseinput_bloodgroup" name="spouseq_bloodgroup" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="A+">A+</option>
            <option value="A-">A-</option>
            <option value="B+">B+</option>
            <option value="B-">B-</option>
            <option value="AB+">AB-</option>
            <option value="AB_">AB+</option>
            <option value="O+">O+</option>
            <option value="O-">O-</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="spouseid_allergies"><label class="form-label form-label-left form-label-auto" id="spouselabel_allergies" for="spouseinput_allergies"> Allergies </label>
        <div id="spousecid_allergies" class="form-input " data-layout="half"> <input type="text" id="spouseinput_allergies" name="spouseq_allergies" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="spouselabel_allergies" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="spouseid_Preextcon"><label class="form-label form-label-left form-label-auto" id="spouselabel_Preextcon" for="spouseinput_Preextcon"> Any Pre-Existing Condition? </label>
        <div id="spousecid_Preextcon" class="form-input " data-layout="half"> <select class="form-dropdown " id="spouseinput_Preextcon" name="spouseq_Preextcon" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="spouseid_Preextconans"><label class="form-label form-label-left form-label-auto" id="spouselabel_Preextconans" for="Preextconans"> If yes? Pre-Existing Condition <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="spousecid_Preextconans" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="spouseinput_Preextconans" name="spouseq_Preextconans" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" eg. hypertension, diabetes, asthma , etc" data-component="textbox" aria-labelledby="spouselabel_Preextconans" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="spouseid_surgicalque"><label class="form-label form-label-left form-label-auto" id="spouselabel_surgicalque" for="spouseinput_surgicalque"> Any Surgical History? </label>
        <div id="spousecid_surgicalque" class="form-input " data-layout="half"> <select class="form-dropdown " id="spouseinput_surgicalque" name="spouseq_surgicalque" style="width:310px" data-component="dropdown" required="" aria-label="surgicalque">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="spouseid_surgical"><label class="form-label form-label-left form-label-auto" id="spouselabel_surgical" for="spouseinput_surgical"> If yes? Surgical History<span class="form-required>"></span> </label>
        <div id="spousecid_surgical" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="spouseinput_surgical" name="spouseq_surgical" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="spouselabel_surgical" /> </div>
      
       <li class="form-line " data-type="control_fileupload" id="spouseid_99">
        <label class="form-label form-label-left form-label-auto" id="spouselabel_99" for="spouseinput_99">
          Passport
          <span class="form-required">
            *
          </span>
        </label>
        <div id="spousecid_99" class="form-input ">
          <span class="form-sub-label-container" style="vertical-align:top">
            <input type="file" id="spouseinput_99" name="spouseq99_passport" class="form-upload " data-imagevalidate="yes" data-file-accept="jpg, jpeg, png, gif" data-file-maxsize="10240" data-file-minsize="0" data-file-limit="" data-component="fileupload" required="" />
            <label class="form-sub-label" for="spouseinput_99" style="min-height:13px" aria-hidden="false"> Select passport photo from your device. Kindly note that the Maximum passport size is 5mb </label>
          </span>
        </div>
      </li>
      <li class="form-line" data-type="control_divider" id="id_45">
        <div id="cid_45" class="form-input-wide" data-layout="full">
          <div class="divider" data-component="divider" style="border-bottom-width:1px;border-bottom-style:solid;border-color:#e6e6e6;height:1px;margin-left:0px;margin-right:0px;margin-top:5px;margin-bottom:5px"></div>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_46">
        <div id="cid_46" class="form-input-wide" data-layout="full">
          <div id="text_46" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: center;"><span style="font-size: 18pt; color: #0000ff;"><strong><strong>DEPENDENTS<br /></strong></strong></span></p>
          </div>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_49">
        <div id="cid_49" class="form-input-wide" data-layout="full">
          <div id="text_49" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: left;"><span style="font-size: 12pt; color: #ff0000;"><strong><strong>DEPENDENT 1<br /></strong></strong></span></p>
          </div>
        </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen1id_4"><label class="form-label form-label-left form-label-auto" id="depen1label_4" for="depen1input_4"> Surname </label>
        <div id="depen1cid_4" class="form-input " data-layout="half"> <input type="text" id="depen1input_4" name="depen1q4_surname" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen1label_4" required="" /> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen1id_26"><label class="form-label form-label-left form-label-auto" id="depen1label_26" for="depen1input_26"> First Name </label>
        <div id="depen1cid_26" class="form-input " data-layout="half"> <input type="text" id="depen1input_26" name="depen1q26_firstName" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen1label_26" required="" /> </div>
      </li>
      <li class="form-line" data-type="control_textbox" id="depen1id_27"><label class="form-label form-label-left form-label-auto" id="depen1label_27" for="depen1input_27"> Middle Name </label>
        <div id="depen1cid_27" class="form-input" data-layout="half"> <input type="text" id="depen1input_27" name="depen1q27_middleName" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen1label_27" /> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen1id_22"><label class="form-label form-label-left form-label-auto" id="depen1label_22" for="depen1input_22"> Gender </label>
        <div id="depen1cid_22" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen1input_22" name="depen1q22_gender" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Male">Male</option>
            <option value="Female">Female</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_email" id="depen1id_24"><label class="form-label form-label-left form-label-auto" id="depen1label_24" for="depen1input_24"> Email Address </label>
        <div id="depen1cid_24" class="form-input " data-layout="half"> <input type="email" id="depen1input_24" name="depen1q24_emailAddress" data-type="input-textbox" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen1label_24" /> </div>
      </li>
      <li class="form-line " data-type="control_birthdate" id="depen1id_9"><label class="form-label form-label-left form-label-auto" id="depen1label_9" for="depen1input_9"> Date of Birth </label>
        <div id="depen1cid_9" class="form-input " data-layout="full">
          <div data-wrapper-react="true"><span class="form-sub-label-container" style="vertical-align:top"><select name="depen1q9_dateOf[day]" id="depen1input_9_day" class="form-dropdown " data-component="birthdate-day" aria-labelledby="depen1label_9 subdepen1label_9_day">
                <option></option>
                <option value="01">1</option>
                <option value="02">2</option>
                <option value="03">3</option>
                <option value="04">4</option>
                <option value="05">5</option>
                <option value="06">6</option>
                <option value="07">7</option>
                <option value="08">8</option>
                <option value="09">9</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
                <option value="20">20</option>
                <option value="21">21</option>
                <option value="22">22</option>
                <option value="23">23</option>
                <option value="24">24</option>
                <option value="25">25</option>
                <option value="26">26</option>
                <option value="27">27</option>
                <option value="28">28</option>
                <option value="29">29</option>
                <option value="30">30</option>
                <option value="31">31</option>
              </select><label class="form-sub-label" for="depen1input_9_day" id="subdepen1label_9_day" style="min-height:13px" aria-hidden="false">Day</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen1q9_dateOf[month]" id="depen1input_9_month" class="form-dropdown " data-component="birthdate-month" aria-labelledby="depen1label_9 subdepen1label_9_month">
                <option></option>
                <option value="01">January</option>
                <option value="02">February</option>
                <option value="03">March</option>
                <option value="04">April</option>
                <option value="05">May</option>
                <option value="06">June</option>
                <option value="07">July</option>
                <option value="08">August</option>
                <option value="09">September</option>
                <option value="10">October</option>
                <option value="11">November</option>
                <option value="12">December</option>
              </select><label class="form-sub-label" for="depen1input_9_month" id="subdepen1label_9_month" style="min-height:13px" aria-hidden="false">Month</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen1q9_dateOf[year]" id="depen1input_9_year" class="form-dropdown " data-component="birthdate-year" aria-labelledby="depen1label_9 subdepen1label_9_year">
                <option></option>
                <option value="2023">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>
                <option value="2019">2019</option>
                <option value="2018">2018</option>
                <option value="2017">2017</option>
                <option value="2016">2016</option>
                <option value="2015">2015</option>
                <option value="2014">2014</option>
                <option value="2013">2013</option>
                <option value="2012">2012</option>
                <option value="2011">2011</option>
                <option value="2010">2010</option>
                <option value="2009">2009</option>
                <option value="2008">2008</option>
                <option value="2007">2007</option>
                <option value="2006">2006</option>
                <option value="2005">2005</option>
                <option value="2004">2004</option>
                <option value="2003">2003</option>
                <option value="2002">2002</option>
                <option value="2001">2001</option>
                <option value="2000">2000</option>
                <option value="1999">1999</option>
                <option value="1998">1998</option>
                <option value="1997">1997</option>
                <option value="1996">1996</option>
                <option value="1995">1995</option>
                <option value="1994">1994</option>
                <option value="1993">1993</option>
                <option value="1992">1992</option>
                <option value="1991">1991</option>
                <option value="1990">1990</option>
                <option value="1989">1989</option>
                <option value="1988">1988</option>
                <option value="1987">1987</option>
                <option value="1986">1986</option>
                <option value="1985">1985</option>
                <option value="1984">1984</option>
                <option value="1983">1983</option>
                <option value="1982">1982</option>
                <option value="1981">1981</option>
                <option value="1980">1980</option>
                <option value="1979">1979</option>
                <option value="1978">1978</option>
                <option value="1977">1977</option>
                <option value="1976">1976</option>
                <option value="1975">1975</option>
                <option value="1974">1974</option>
                <option value="1973">1973</option>
                <option value="1972">1972</option>
                <option value="1971">1971</option>
                <option value="1970">1970</option>
                <option value="1969">1969</option>
                <option value="1968">1968</option>
                <option value="1967">1967</option>
                <option value="1966">1966</option>
                <option value="1965">1965</option>
                <option value="1964">1964</option>
                <option value="1963">1963</option>
                <option value="1962">1962</option>
                <option value="1961">1961</option>
                <option value="1960">1960</option>
                <option value="1959">1959</option>
                <option value="1958">1958</option>
                <option value="1957">1957</option>
                <option value="1956">1956</option>
                <option value="1955">1955</option>
                <option value="1954">1954</option>
                <option value="1953">1953</option>
                <option value="1952">1952</option>
                <option value="1951">1951</option>
                <option value="1950">1950</option>
                <option value="1949">1949</option>
                <option value="1948">1948</option>
                <option value="1947">1947</option>
                <option value="1946">1946</option>
                <option value="1945">1945</option>
                <option value="1944">1944</option>
                <option value="1943">1943</option>
                <option value="1942">1942</option>
                <option value="1941">1941</option>
                <option value="1940">1940</option>
                <option value="1939">1939</option>
                <option value="1938">1938</option>
                <option value="1937">1937</option>
                <option value="1936">1936</option>
                <option value="1935">1935</option>
                <option value="1934">1934</option>
                <option value="1933">1933</option>
                <option value="1932">1932</option>
                <option value="1931">1931</option>
                <option value="1930">1930</option>
                <option value="1929">1929</option>
                <option value="1928">1928</option>
                <option value="1927">1927</option>
                <option value="1926">1926</option>
                <option value="1925">1925</option>
                <option value="1924">1924</option>
                <option value="1923">1923</option>
                <option value="1922">1922</option>
                <option value="1921">1921</option>
                <option value="1920">1920</option>
              </select><label class="form-sub-label" for="depen1input_9_year" id="subdepen1label_9_year" style="min-height:13px" aria-hidden="false">Year</label></span></div>
        </div>
      </li>
      <li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> State</label>
  <div id="cid_20" class="form-input" data-layout="full">
  <select class="form-dropdown" id="depen1input_20_state" onchange="updatedepen1Hospitals()" name="depen1q20_address[state]"
                      required>
                      <option selected disabled>Select State</option>
                      <option value="Abia">Abia</option>
                      <option value="Adamawa">Adamawa</option>
                      <option value="Abuja">Abuja</option>
                      <option value="AkwaIbom">Akwa Ibom</option>
                      <option value="Anambra">Anambra</option>
                      <option value="Bauchi">Bauchi</option>
                      <option value="Bayelsa">Bayelsa</option>
                      <option value="Benue">Benue</option>
                      <option value="Borno">Borno</option>
                      <option value="CrossRiver">Cross River</option>
                      <option value="Delta">Delta</option>
                      <option value="Ebonyi">Ebonyi</option>
                      <option value="Edo">Edo</option>
                      <option value="Ekiti">Ekiti</option>
                      <option value="Enugu">Enugu</option>
                      <option value="Gombe">Gombe</option>
                      <option value="Imo">Imo</option>
                      <option value="Jigawa">Jigawa</option>
                      <option value="Kaduna">Kaduna</option>
                      <option value="Kano">Kano</option>
                      <option value="Katsina">Katsina</option>
                      <option value="Kebbi">Kebbi</option>
                      <option value="Kogi">Kogi</option>
                      <option value="Kwara">Kwara</option>
                      <option value="Lagos">Lagos</option>
                      <option value="Nassarawa">Nassarawa</option>
                      <option value="Niger">Niger</option>
                      <option value="Ogun">Ogun</option>
                      <option value="Ondo">Ondo</option>
                      <option value="Osun">Osun</option>
                      <option value="Oyo">Oyo</option>
                      <option value="Plateau">Plateau</option>
                      <option value="Rivers">Rivers</option>
                      <option value="Sokoto">Sokoto</option>
                      <option value="Taraba">Taraba</option>
                      <option value="Yobe">Yobe</option>
                      <option value="Zamfara">Zamfara</option>
                  </select><label class="form-sub-label" for="input_20_state" id="sublabel_20_state" style="min-height:13px" aria-hidden="false">State</label></span></span>
      <!--<div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-zip-line jsTest-address-lineField "><span class="form-sub-label-container" style="vertical-align:top">
          
          
          <select class="form-dropdown validate[required]" name="q20_address[postal]" onchange="populatecity()" id="input_20_postal">
                      <option selected disabled>Select Local Government</option>
                  </select>
                  <script src="./statelga.js"></script>
          
          <label class="form-sub-label" for="input_20_postal" id="sublabel_20_postal" style="min-height:13px" aria-hidden="false">LGA</label></span></span></div>
    </div> -->





 <!--<li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> City </label>
  <div id="cid_31" class="form-input" data-layout="half"> 
      <span class="form-sub-label-container" style="vertical-align:top">
      <select class=" form-readonly form-dropdown" id="depen1city" onchange="updatedepen1Hospitals()" name="depen1q20_address[city]" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="label_31 sublabel_input_31">
                  <script src="./city.js"></script>
              </select>

</li> -->
      <li class="form-line " data-type="control_dropdown" id="depen1id_31"><label class="form-label form-label-left form-label-auto" id="depen1label_31" for="depen1input_31"> Preferred Hospitals </label>
        <div id="depen1cid_31" class="form-input " data-layout="half"> 
            <span class="form-sub-label-container" style="vertical-align:top">
            <select class=" form-readonly form-dropdown " id="depen1input_31x" name="depen1q31_hospitalsx" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="depen1label_31 subdepen1label_depen1input_31">
                      <!-- <datalist id="depen1input_31b">
                      <option value="">
                      <option value=""> 
                    </datalist> -->
                    <option value "<?=$Providerval;?>" selected="" ><?=$Providerval;?> </option>
                    
                </select>
            
            <label class="form-sub-label" for="depen1input_31" id="subdepen1label_depen1input_31" style="min-height:13px" aria-hidden="false">NB. You Must Choose your Plan Before The Hospital List Will Display</b>
                <br> You can type the <b>State</b>, <b>Location</b> or <b>Name of hospital</b> you want to choose from. choose from the displayed hospital list* </br>
                </label></span> 
            </div>
      </li>
      
      <script>
    let depen1HospitalChoices;

    document.addEventListener('DOMContentLoaded', function () {
        // Initialize Choices.js for depen1 hospital dropdown
        depen1HospitalChoices = new Choices('#depen1input_31x', {
            searchEnabled: true,
            searchPlaceholderValue: 'Search for a provider...',
            shouldSort: true
        });

        // Update hospitals when the state changes
        document.getElementById('depen1input_20_state').addEventListener('change', updatedepen1Hospitals);
    });

    function updatedepen1Hospitals() {
        var planType = document.getElementById('input_30').value;
        var state = document.getElementById('depen1input_20_state').value;
        var depen1HospitalDropdown = document.getElementById('depen1input_31x');

        // Clear the depen1 hospital dropdown
        depen1HospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

        if (state) {
            // Fetch the hospitals for the selected state
            fetch('get_hospitals.php?state=' + state + '&planType=' + planType)
                .then(response => response.json())
                .then(data => {
                    data.hospitals.forEach(provider_name => {
                        var option = document.createElement('option');
                        option.value = provider_name;
                        option.text = provider_name;
                        depen1HospitalDropdown.add(option);
                    });

                    // Reinitialize Choices.js for depen1 hospital dropdown
                    depen1HospitalChoices.setChoices([{
                        label: 'Choose a Provider',
                        value: '',
                        selected: true,
                        disabled: true
                    }].concat(data.hospitals.map(hospital => ({
                        label: hospital,
                        value: hospital
                    }))), 'value', 'label', true);
                })
                .catch(error => console.error('Error fetching hospitals:', error));
        }
    }
</script>
      <li class="form-line " data-type="control_dropdown" id="depen1id_genotype"><label class="form-label form-label-left form-label-auto" id="depen1label_genotype" for="depen1input_genotype"> Genotype </label>
        <div id="depen1cid_genotype" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen1input_genotype" name="depen1q_genotype" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="AA">AA</option>
            <option value="AC">AC</option>
            <option value="AS">AS</option>
            <option value="CC">CC</option>
            <option value="SC">SC</option>
            <option value="SS">SS</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen1id_bloodgroup"><label class="form-label form-label-left form-label-auto" id="depen1label_bloodgroup" for="depen1input_bloodgroup"> Blood Group </label>
        <div id="depen1cid_bloodgroup" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen1input_bloodgroup" name="depen1q_bloodgroup" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="A+">A+</option>
            <option value="A-">A-</option>
            <option value="B+">B+</option>
            <option value="B-">B-</option>
            <option value="AB+">AB-</option>
            <option value="AB_">AB+</option>
            <option value="O+">O+</option>
            <option value="O-">O-</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen1id_allergies"><label class="form-label form-label-left form-label-auto" id="depen1label_allergies" for="depen1input_allergies"> Allergies </label>
        <div id="depen1cid_allergies" class="form-input " data-layout="half"> <input type="text" id="depen1input_allergies" name="depen1q_allergies" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen1label_allergies" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen1id_Preextcon"><label class="form-label form-label-left form-label-auto" id="depen1label_Preextcon" for="depen1input_Preextcon"> Any Pre-Existing Condition? </label>
        <div id="depen1cid_Preextcon" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen1input_Preextcon" name="depen1q_Preextcon" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen1id_Preextconans"><label class="form-label form-label-left form-label-auto" id="depen1label_Preextconans" for="Preextconans"> If yes? Pre-Existing Condition <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="depen1cid_Preextconans" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen1input_Preextconans" name="depen1q_Preextconans" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" eg. hypertension, diabetes, asthma , etc" data-component="textbox" aria-labelledby="depen1label_Preextconans" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen1id_surgicalque"><label class="form-label form-label-left form-label-auto" id="depen1label_surgicalque" for="depen1input_surgicalque"> Any Surgical History? </label>
        <div id="depen1cid_surgicalque" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen1input_surgicalque" name="depen1q_surgicalque" style="width:310px" data-component="dropdown" required="" aria-label="surgicalque">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen1id_surgical"><label class="form-label form-label-left form-label-auto" id="depen1label_surgical" for="depen1input_surgical"> If yes? Surgical History<span class="form-required>"></span> </label>
        <div id="depen1cid_surgical" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen1input_surgical" name="depen1q_surgical" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen1label_surgical" /> </div>
      
       <li class="form-line " data-type="control_fileupload" id="depen1id_99">
        <label class="form-label form-label-left form-label-auto" id="depen1label_99" for="depen1input_99">
          Passport
          <span class="form-required">
            *
          </span>
        </label>
        <div id="depen1cid_99" class="form-input ">
          <span class="form-sub-label-container" style="vertical-align:top">
            <input type="file" id="depen1input_99" name="depen1q99_passport" class="form-upload " data-imagevalidate="yes" data-file-accept="jpg, jpeg, png, gif" data-file-maxsize="10240" data-file-minsize="0" data-file-limit="" data-component="fileupload" required="" />
            <label class="form-sub-label" for="depen1input_99" style="min-height:13px" aria-hidden="false"> Select passport photo from your device. Kindly note that the Maximum passport size is 5mb </label>
          </span>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_59">
        <div id="cid_59" class="form-input-wide" data-layout="full">
          <div id="text_59" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: left;"><span style="font-size: 12pt; color: #ff0000;"><strong><strong>DEPENDENT 2<br /></strong></strong></span></p>
          </div>
        </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen2id_4"><label class="form-label form-label-left form-label-auto" id="depen2label_4" for="depen2input_4"> Surname </label>
        <div id="depen2cid_4" class="form-input " data-layout="half"> <input type="text" id="depen2input_4" name="depen2q4_surname" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen2label_4" required="" /> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen2id_26"><label class="form-label form-label-left form-label-auto" id="depen2label_26" for="depen2input_26"> First Name </label>
        <div id="depen2cid_26" class="form-input " data-layout="half"> <input type="text" id="depen2input_26" name="depen2q26_firstName" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen2label_26" required="" /> </div>
      </li>
      <li class="form-line" data-type="control_textbox" id="depen2id_27"><label class="form-label form-label-left form-label-auto" id="depen2label_27" for="depen2input_27"> Middle Name </label>
        <div id="depen2cid_27" class="form-input" data-layout="half"> <input type="text" id="depen2input_27" name="depen2q27_middleName" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen2label_27" /> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen2id_22"><label class="form-label form-label-left form-label-auto" id="depen2label_22" for="depen2input_22"> Gender </label>
        <div id="depen2cid_22" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen2input_22" name="depen2q22_gender" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Male">Male</option>
            <option value="Female">Female</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_email" id="depen2id_24"><label class="form-label form-label-left form-label-auto" id="depen2label_24" for="depen2input_24"> Email Address </label>
        <div id="depen2cid_24" class="form-input " data-layout="half"> <input type="email" id="depen2input_24" name="depen2q24_emailAddress" data-type="input-textbox" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen2label_24" /> </div>
      </li>
      <li class="form-line " data-type="control_birthdate" id="depen2id_9"><label class="form-label form-label-left form-label-auto" id="depen2label_9" for="depen2input_9"> Date of Birth </label>
        <div id="depen2cid_9" class="form-input " data-layout="full">
          <div data-wrapper-react="true"><span class="form-sub-label-container" style="vertical-align:top"><select name="depen2q9_dateOf[day]" id="depen2input_9_day" class="form-dropdown " data-component="birthdate-day" aria-labelledby="depen2label_9 subdepen2label_9_day">
                <option></option>
                <option value="01">1</option>
                <option value="02">2</option>
                <option value="03">3</option>
                <option value="04">4</option>
                <option value="05">5</option>
                <option value="06">6</option>
                <option value="07">7</option>
                <option value="08">8</option>
                <option value="09">9</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
                <option value="20">20</option>
                <option value="21">21</option>
                <option value="22">22</option>
                <option value="23">23</option>
                <option value="24">24</option>
                <option value="25">25</option>
                <option value="26">26</option>
                <option value="27">27</option>
                <option value="28">28</option>
                <option value="29">29</option>
                <option value="30">30</option>
                <option value="31">31</option>
              </select><label class="form-sub-label" for="depen2input_9_day" id="subdepen2label_9_day" style="min-height:13px" aria-hidden="false">Day</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen2q9_dateOf[month]" id="depen2input_9_month" class="form-dropdown " data-component="birthdate-month" aria-labelledby="depen2label_9 subdepen2label_9_month">
                <option></option>
                <option value="01">January</option>
                <option value="02">February</option>
                <option value="03">March</option>
                <option value="04">April</option>
                <option value="05">May</option>
                <option value="06">June</option>
                <option value="07">July</option>
                <option value="08">August</option>
                <option value="09">September</option>
                <option value="10">October</option>
                <option value="11">November</option>
                <option value="12">December</option>
              </select><label class="form-sub-label" for="depen2input_9_month" id="subdepen2label_9_month" style="min-height:13px" aria-hidden="false">Month</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen2q9_dateOf[year]" id="depen2input_9_year" class="form-dropdown " data-component="birthdate-year" aria-labelledby="depen2label_9 subdepen2label_9_year">
                <option></option>
                <option value="2023">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>
                <option value="2019">2019</option>
                <option value="2018">2018</option>
                <option value="2017">2017</option>
                <option value="2016">2016</option>
                <option value="2015">2015</option>
                <option value="2014">2014</option>
                <option value="2013">2013</option>
                <option value="2012">2012</option>
                <option value="2011">2011</option>
                <option value="2010">2010</option>
                <option value="2009">2009</option>
                <option value="2008">2008</option>
                <option value="2007">2007</option>
                <option value="2006">2006</option>
                <option value="2005">2005</option>
                <option value="2004">2004</option>
                <option value="2003">2003</option>
                <option value="2002">2002</option>
                <option value="2001">2001</option>
                <option value="2000">2000</option>
                <option value="1999">1999</option>
                <option value="1998">1998</option>
                <option value="1997">1997</option>
                <option value="1996">1996</option>
                <option value="1995">1995</option>
                <option value="1994">1994</option>
                <option value="1993">1993</option>
                <option value="1992">1992</option>
                <option value="1991">1991</option>
                <option value="1990">1990</option>
                <option value="1989">1989</option>
                <option value="1988">1988</option>
                <option value="1987">1987</option>
                <option value="1986">1986</option>
                <option value="1985">1985</option>
                <option value="1984">1984</option>
                <option value="1983">1983</option>
                <option value="1982">1982</option>
                <option value="1981">1981</option>
                <option value="1980">1980</option>
                <option value="1979">1979</option>
                <option value="1978">1978</option>
                <option value="1977">1977</option>
                <option value="1976">1976</option>
                <option value="1975">1975</option>
                <option value="1974">1974</option>
                <option value="1973">1973</option>
                <option value="1972">1972</option>
                <option value="1971">1971</option>
                <option value="1970">1970</option>
                <option value="1969">1969</option>
                <option value="1968">1968</option>
                <option value="1967">1967</option>
                <option value="1966">1966</option>
                <option value="1965">1965</option>
                <option value="1964">1964</option>
                <option value="1963">1963</option>
                <option value="1962">1962</option>
                <option value="1961">1961</option>
                <option value="1960">1960</option>
                <option value="1959">1959</option>
                <option value="1958">1958</option>
                <option value="1957">1957</option>
                <option value="1956">1956</option>
                <option value="1955">1955</option>
                <option value="1954">1954</option>
                <option value="1953">1953</option>
                <option value="1952">1952</option>
                <option value="1951">1951</option>
                <option value="1950">1950</option>
                <option value="1949">1949</option>
                <option value="1948">1948</option>
                <option value="1947">1947</option>
                <option value="1946">1946</option>
                <option value="1945">1945</option>
                <option value="1944">1944</option>
                <option value="1943">1943</option>
                <option value="1942">1942</option>
                <option value="1941">1941</option>
                <option value="1940">1940</option>
                <option value="1939">1939</option>
                <option value="1938">1938</option>
                <option value="1937">1937</option>
                <option value="1936">1936</option>
                <option value="1935">1935</option>
                <option value="1934">1934</option>
                <option value="1933">1933</option>
                <option value="1932">1932</option>
                <option value="1931">1931</option>
                <option value="1930">1930</option>
                <option value="1929">1929</option>
                <option value="1928">1928</option>
                <option value="1927">1927</option>
                <option value="1926">1926</option>
                <option value="1925">1925</option>
                <option value="1924">1924</option>
                <option value="1923">1923</option>
                <option value="1922">1922</option>
                <option value="1921">1921</option>
                <option value="1920">1920</option>
              </select><label class="form-sub-label" for="depen2input_9_year" id="subdepen2label_9_year" style="min-height:13px" aria-hidden="false">Year</label></span></div>
        </div>
      </li>
      
      <li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> State</label>
  <div id="cid_20" class="form-input" data-layout="full">
  <select class="form-dropdown" id="depen2input_20_state" onchange="updatedepen2Hospitals()" name="depen2q20_address[state]"
                      required>
                      <option selected disabled>Select State</option>
                      <option value="Abia">Abia</option>
                      <option value="Adamawa">Adamawa</option>
                      <option value="Abuja">Abuja</option>
                      <option value="AkwaIbom">Akwa Ibom</option>
                      <option value="Anambra">Anambra</option>
                      <option value="Bauchi">Bauchi</option>
                      <option value="Bayelsa">Bayelsa</option>
                      <option value="Benue">Benue</option>
                      <option value="Borno">Borno</option>
                      <option value="CrossRiver">Cross River</option>
                      <option value="Delta">Delta</option>
                      <option value="Ebonyi">Ebonyi</option>
                      <option value="Edo">Edo</option>
                      <option value="Ekiti">Ekiti</option>
                      <option value="Enugu">Enugu</option>
                      <option value="Gombe">Gombe</option>
                      <option value="Imo">Imo</option>
                      <option value="Jigawa">Jigawa</option>
                      <option value="Kaduna">Kaduna</option>
                      <option value="Kano">Kano</option>
                      <option value="Katsina">Katsina</option>
                      <option value="Kebbi">Kebbi</option>
                      <option value="Kogi">Kogi</option>
                      <option value="Kwara">Kwara</option>
                      <option value="Lagos">Lagos</option>
                      <option value="Nassarawa">Nassarawa</option>
                      <option value="Niger">Niger</option>
                      <option value="Ogun">Ogun</option>
                      <option value="Ondo">Ondo</option>
                      <option value="Osun">Osun</option>
                      <option value="Oyo">Oyo</option>
                      <option value="Plateau">Plateau</option>
                      <option value="Rivers">Rivers</option>
                      <option value="Sokoto">Sokoto</option>
                      <option value="Taraba">Taraba</option>
                      <option value="Yobe">Yobe</option>
                      <option value="Zamfara">Zamfara</option>
                  </select><label class="form-sub-label" for="input_20_state" id="sublabel_20_state" style="min-height:13px" aria-hidden="false">State</label></span></span>
      <!--<div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-zip-line jsTest-address-lineField "><span class="form-sub-label-container" style="vertical-align:top">
          
          
          <select class="form-dropdown validate[required]" name="q20_address[postal]" onchange="populatecity()" id="input_20_postal">
                      <option selected disabled>Select Local Government</option>
                  </select>
                  <script src="./statelga.js"></script>
          
          <label class="form-sub-label" for="input_20_postal" id="sublabel_20_postal" style="min-height:13px" aria-hidden="false">LGA</label></span></span></div>
    </div> -->





 <!--<li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> City </label>
  <div id="cid_31" class="form-input" data-layout="half"> 
      <span class="form-sub-label-container" style="vertical-align:top">
      <select class=" form-readonly form-dropdown" id="depen2city" onchange="updatedepen2Hospitals()" name="depen2q20_address[city]" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="label_31 sublabel_input_31">
                  <script src="./city.js"></script>
              </select>

</li> -->
      <li class="form-line " data-type="control_dropdown" id="depen2id_31"><label class="form-label form-label-left form-label-auto" id="depen2label_31" for="depen2input_31"> Preferred Hospitals </label>
        <div id="depen2cid_31" class="form-input " data-layout="half"> 
            <span class="form-sub-label-container" style="vertical-align:top">
            <select class=" form-readonly form-dropdown " id="depen2input_31x" name="depen2q31_hospitalsx" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="depen2label_31 subdepen2label_depen2input_31">
                      <!-- <datalist id="depen2input_31b">
                      <option value="">
                      <option value=""> 
                    </datalist> -->
                    <option value "<?=$Providerval;?>" selected="" ><?=$Providerval;?> </option>
                    
                </select>
            
            <label class="form-sub-label" for="depen2input_31" id="subdepen2label_depen2input_31" style="min-height:13px" aria-hidden="false">NB. You Must Choose your Plan Before The Hospital List Will Display</b>
                <br> You can type the <b>State</b>, <b>Location</b> or <b>Name of hospital</b> you want to choose from. choose from the displayed hospital list* </br>
                </label></span> 
            </div>
      </li>
     <script>
    let depen2HospitalChoices;

    document.addEventListener('DOMContentLoaded', function () {
        // Initialize Choices.js for depen2 hospital dropdown
        depen2HospitalChoices = new Choices('#depen2input_31x', {
            searchEnabled: true,
            searchPlaceholderValue: 'Search for a provider...',
            shouldSort: true
        });

        // Update hospitals when the state changes
        document.getElementById('depen2input_20_state').addEventListener('change', updatedepen2Hospitals);
    });

    function updatedepen2Hospitals() {
        var planType = document.getElementById('input_30').value;
        var state = document.getElementById('depen2input_20_state').value;
        var depen2HospitalDropdown = document.getElementById('depen2input_31x');

        // Clear the depen2 hospital dropdown
        depen2HospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

        if (state) {
            // Fetch the hospitals for the selected state
            fetch('get_hospitals.php?state=' + state + '&planType=' + planType)
                .then(response => response.json())
                .then(data => {
                    data.hospitals.forEach(provider_name => {
                        var option = document.createElement('option');
                        option.value = provider_name;
                        option.text = provider_name;
                        depen2HospitalDropdown.add(option);
                    });

                    // Reinitialize Choices.js for depen2 hospital dropdown
                    depen2HospitalChoices.setChoices([{
                        label: 'Choose a Provider',
                        value: '',
                        selected: true,
                        disabled: true
                    }].concat(data.hospitals.map(hospital => ({
                        label: hospital,
                        value: hospital
                    }))), 'value', 'label', true);
                })
                .catch(error => console.error('Error fetching hospitals:', error));
        }
    }
</script>
      
      <li class="form-line " data-type="control_dropdown" id="depen2id_genotype"><label class="form-label form-label-left form-label-auto" id="depen2label_genotype" for="depen2input_genotype"> Genotype </label>
        <div id="depen2cid_genotype" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen2input_genotype" name="depen2q_genotype" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="AA">AA</option>
            <option value="AC">AC</option>
            <option value="AS">AS</option>
            <option value="CC">CC</option>
            <option value="SC">SC</option>
            <option value="SS">SS</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen2id_bloodgroup"><label class="form-label form-label-left form-label-auto" id="depen2label_bloodgroup" for="depen2input_bloodgroup"> Blood Group </label>
        <div id="depen2cid_bloodgroup" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen2input_bloodgroup" name="depen2q_bloodgroup" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="A+">A+</option>
            <option value="A-">A-</option>
            <option value="B+">B+</option>
            <option value="B-">B-</option>
            <option value="AB+">AB-</option>
            <option value="AB_">AB+</option>
            <option value="O+">O+</option>
            <option value="O-">O-</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen2id_allergies"><label class="form-label form-label-left form-label-auto" id="depen2label_allergies" for="depen2input_allergies"> Allergies </label>
        <div id="depen2cid_allergies" class="form-input " data-layout="half"> <input type="text" id="depen2input_allergies" name="depen2q_allergies" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen2label_allergies" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen2id_Preextcon"><label class="form-label form-label-left form-label-auto" id="depen2label_Preextcon" for="depen2input_Preextcon"> Any Pre-Existing Condition? </label>
        <div id="depen2cid_Preextcon" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen2input_Preextcon" name="depen2q_Preextcon" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen2id_Preextconans"><label class="form-label form-label-left form-label-auto" id="depen2label_Preextconans" for="Preextconans"> If yes? Pre-Existing Condition <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="depen2cid_Preextconans" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen2input_Preextconans" name="depen2q_Preextconans" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" eg. hypertension, diabetes, asthma , etc" data-component="textbox" aria-labelledby="depen2label_Preextconans" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen2id_surgicalque"><label class="form-label form-label-left form-label-auto" id="depen2label_surgicalque" for="depen2input_surgicalque"> Any Surgical History? </label>
        <div id="depen2cid_surgicalque" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen2input_surgicalque" name="depen2q_surgicalque" style="width:310px" data-component="dropdown" required="" aria-label="surgicalque">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen2id_surgical"><label class="form-label form-label-left form-label-auto" id="depen2label_surgical" for="depen2input_surgical"> If yes? Surgical History<span class="form-required>"></span> </label>
        <div id="depen2cid_surgical" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen2input_surgical" name="depen2q_surgical" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen2label_surgical" /> </div>
      
       <li class="form-line " data-type="control_fileupload" id="depen2id_99">
        <label class="form-label form-label-left form-label-auto" id="depen2label_99" for="depen2input_99">
          Passport
          <span class="form-required">
            *
          </span>
        </label>
        <div id="depen2cid_99" class="form-input ">
          <span class="form-sub-label-container" style="vertical-align:top">
            <input type="file" id="depen2input_99" name="depen2q99_passport" class="form-upload " data-imagevalidate="yes" data-file-accept="jpg, jpeg, png, gif" data-file-maxsize="10240" data-file-minsize="0" data-file-limit="" data-component="fileupload" required="" />
            <label class="form-sub-label" for="depen2input_99" style="min-height:13px" aria-hidden="false"> Select passport photo from your device. Kindly note that the Maximum passport size is 5mb </label>
          </span>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_68">
        <div id="cid_68" class="form-input-wide" data-layout="full">
          <div id="text_68" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: left;"><span style="font-size: 12pt; color: #ff0000;"><strong><strong>DEPENDENT 3<br /></strong></strong></span></p>
          </div>
        </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen3id_4"><label class="form-label form-label-left form-label-auto" id="depen3label_4" for="depen3input_4"> Surname </label>
        <div id="depen3cid_4" class="form-input " data-layout="half"> <input type="text" id="depen3input_4" name="depen3q4_surname" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen3label_4" required="" /> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen3id_26"><label class="form-label form-label-left form-label-auto" id="depen3label_26" for="depen3input_26"> First Name </label>
        <div id="depen3cid_26" class="form-input " data-layout="half"> <input type="text" id="depen3input_26" name="depen3q26_firstName" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen3label_26" required="" /> </div>
      </li>
      <li class="form-line" data-type="control_textbox" id="depen3id_27"><label class="form-label form-label-left form-label-auto" id="depen3label_27" for="depen3input_27"> Middle Name </label>
        <div id="depen3cid_27" class="form-input" data-layout="half"> <input type="text" id="depen3input_27" name="depen3q27_middleName" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen3label_27" /> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen3id_22"><label class="form-label form-label-left form-label-auto" id="depen3label_22" for="depen3input_22"> Gender </label>
        <div id="depen3cid_22" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen3input_22" name="depen3q22_gender" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Male">Male</option>
            <option value="Female">Female</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_email" id="depen3id_24"><label class="form-label form-label-left form-label-auto" id="depen3label_24" for="depen3input_24"> Email Address </label>
        <div id="depen3cid_24" class="form-input " data-layout="half"> <input type="email" id="depen3input_24" name="depen3q24_emailAddress" data-type="input-textbox" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen3label_24" /> </div>
      </li>
      <li class="form-line " data-type="control_birthdate" id="depen3id_9"><label class="form-label form-label-left form-label-auto" id="depen3label_9" for="depen3input_9"> Date of Birth </label>
        <div id="depen3cid_9" class="form-input " data-layout="full">
          <div data-wrapper-react="true"><span class="form-sub-label-container" style="vertical-align:top"><select name="depen3q9_dateOf[day]" id="depen3input_9_day" class="form-dropdown " data-component="birthdate-day" aria-labelledby="depen3label_9 subdepen3label_9_day">
                <option></option>
                <option value="01">1</option>
                <option value="02">2</option>
                <option value="03">3</option>
                <option value="04">4</option>
                <option value="05">5</option>
                <option value="06">6</option>
                <option value="07">7</option>
                <option value="08">8</option>
                <option value="09">9</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
                <option value="20">20</option>
                <option value="21">21</option>
                <option value="22">22</option>
                <option value="23">23</option>
                <option value="24">24</option>
                <option value="25">25</option>
                <option value="26">26</option>
                <option value="27">27</option>
                <option value="28">28</option>
                <option value="29">29</option>
                <option value="30">30</option>
                <option value="31">31</option>
              </select><label class="form-sub-label" for="depen3input_9_day" id="subdepen3label_9_day" style="min-height:13px" aria-hidden="false">Day</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen3q9_dateOf[month]" id="depen3input_9_month" class="form-dropdown " data-component="birthdate-month" aria-labelledby="depen3label_9 subdepen3label_9_month">
                <option></option>
                <option value="01">January</option>
                <option value="02">February</option>
                <option value="03">March</option>
                <option value="04">April</option>
                <option value="05">May</option>
                <option value="06">June</option>
                <option value="07">July</option>
                <option value="08">August</option>
                <option value="09">September</option>
                <option value="10">October</option>
                <option value="11">November</option>
                <option value="12">December</option>
              </select><label class="form-sub-label" for="depen3input_9_month" id="subdepen3label_9_month" style="min-height:13px" aria-hidden="false">Month</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen3q9_dateOf[year]" id="depen3input_9_year" class="form-dropdown " data-component="birthdate-year" aria-labelledby="depen3label_9 subdepen3label_9_year">
                <option></option>
                <option value="2023">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>
                <option value="2019">2019</option>
                <option value="2018">2018</option>
                <option value="2017">2017</option>
                <option value="2016">2016</option>
                <option value="2015">2015</option>
                <option value="2014">2014</option>
                <option value="2013">2013</option>
                <option value="2012">2012</option>
                <option value="2011">2011</option>
                <option value="2010">2010</option>
                <option value="2009">2009</option>
                <option value="2008">2008</option>
                <option value="2007">2007</option>
                <option value="2006">2006</option>
                <option value="2005">2005</option>
                <option value="2004">2004</option>
                <option value="2003">2003</option>
                <option value="2002">2002</option>
                <option value="2001">2001</option>
                <option value="2000">2000</option>
                <option value="1999">1999</option>
                <option value="1998">1998</option>
                <option value="1997">1997</option>
                <option value="1996">1996</option>
                <option value="1995">1995</option>
                <option value="1994">1994</option>
                <option value="1993">1993</option>
                <option value="1992">1992</option>
                <option value="1991">1991</option>
                <option value="1990">1990</option>
                <option value="1989">1989</option>
                <option value="1988">1988</option>
                <option value="1987">1987</option>
                <option value="1986">1986</option>
                <option value="1985">1985</option>
                <option value="1984">1984</option>
                <option value="1983">1983</option>
                <option value="1982">1982</option>
                <option value="1981">1981</option>
                <option value="1980">1980</option>
                <option value="1979">1979</option>
                <option value="1978">1978</option>
                <option value="1977">1977</option>
                <option value="1976">1976</option>
                <option value="1975">1975</option>
                <option value="1974">1974</option>
                <option value="1973">1973</option>
                <option value="1972">1972</option>
                <option value="1971">1971</option>
                <option value="1970">1970</option>
                <option value="1969">1969</option>
                <option value="1968">1968</option>
                <option value="1967">1967</option>
                <option value="1966">1966</option>
                <option value="1965">1965</option>
                <option value="1964">1964</option>
                <option value="1963">1963</option>
                <option value="1962">1962</option>
                <option value="1961">1961</option>
                <option value="1960">1960</option>
                <option value="1959">1959</option>
                <option value="1958">1958</option>
                <option value="1957">1957</option>
                <option value="1956">1956</option>
                <option value="1955">1955</option>
                <option value="1954">1954</option>
                <option value="1953">1953</option>
                <option value="1952">1952</option>
                <option value="1951">1951</option>
                <option value="1950">1950</option>
                <option value="1949">1949</option>
                <option value="1948">1948</option>
                <option value="1947">1947</option>
                <option value="1946">1946</option>
                <option value="1945">1945</option>
                <option value="1944">1944</option>
                <option value="1943">1943</option>
                <option value="1942">1942</option>
                <option value="1941">1941</option>
                <option value="1940">1940</option>
                <option value="1939">1939</option>
                <option value="1938">1938</option>
                <option value="1937">1937</option>
                <option value="1936">1936</option>
                <option value="1935">1935</option>
                <option value="1934">1934</option>
                <option value="1933">1933</option>
                <option value="1932">1932</option>
                <option value="1931">1931</option>
                <option value="1930">1930</option>
                <option value="1929">1929</option>
                <option value="1928">1928</option>
                <option value="1927">1927</option>
                <option value="1926">1926</option>
                <option value="1925">1925</option>
                <option value="1924">1924</option>
                <option value="1923">1923</option>
                <option value="1922">1922</option>
                <option value="1921">1921</option>
                <option value="1920">1920</option>
              </select><label class="form-sub-label" for="depen3input_9_year" id="subdepen3label_9_year" style="min-height:13px" aria-hidden="false">Year</label></span></div>
        </div>
      </li>
      
      <li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> State</label>
  <div id="cid_20" class="form-input" data-layout="full">
  <select class="form-dropdown" id="depen3input_20_state" onchange="updatedepen3Hospitals()" name="depen3q20_address[state]"
                      required>
                      <option selected disabled>Select State</option>
                      <option value="Abia">Abia</option>
                      <option value="Adamawa">Adamawa</option>
                      <option value="Abuja">Abuja</option>
                      <option value="AkwaIbom">Akwa Ibom</option>
                      <option value="Anambra">Anambra</option>
                      <option value="Bauchi">Bauchi</option>
                      <option value="Bayelsa">Bayelsa</option>
                      <option value="Benue">Benue</option>
                      <option value="Borno">Borno</option>
                      <option value="CrossRiver">Cross River</option>
                      <option value="Delta">Delta</option>
                      <option value="Ebonyi">Ebonyi</option>
                      <option value="Edo">Edo</option>
                      <option value="Ekiti">Ekiti</option>
                      <option value="Enugu">Enugu</option>
                      <option value="Gombe">Gombe</option>
                      <option value="Imo">Imo</option>
                      <option value="Jigawa">Jigawa</option>
                      <option value="Kaduna">Kaduna</option>
                      <option value="Kano">Kano</option>
                      <option value="Katsina">Katsina</option>
                      <option value="Kebbi">Kebbi</option>
                      <option value="Kogi">Kogi</option>
                      <option value="Kwara">Kwara</option>
                      <option value="Lagos">Lagos</option>
                      <option value="Nassarawa">Nassarawa</option>
                      <option value="Niger">Niger</option>
                      <option value="Ogun">Ogun</option>
                      <option value="Ondo">Ondo</option>
                      <option value="Osun">Osun</option>
                      <option value="Oyo">Oyo</option>
                      <option value="Plateau">Plateau</option>
                      <option value="Rivers">Rivers</option>
                      <option value="Sokoto">Sokoto</option>
                      <option value="Taraba">Taraba</option>
                      <option value="Yobe">Yobe</option>
                      <option value="Zamfara">Zamfara</option>
                  </select><label class="form-sub-label" for="input_20_state" id="sublabel_20_state" style="min-height:13px" aria-hidden="false">State</label></span></span>
      <!--<div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-zip-line jsTest-address-lineField "><span class="form-sub-label-container" style="vertical-align:top">
          
          
          <select class="form-dropdown validate[required]" name="q20_address[postal]" onchange="populatecity()" id="input_20_postal">
                      <option selected disabled>Select Local Government</option>
                  </select>
                  <script src="./statelga.js"></script>
          
          <label class="form-sub-label" for="input_20_postal" id="sublabel_20_postal" style="min-height:13px" aria-hidden="false">LGA</label></span></span></div>
    </div> -->





 <!--<li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> City </label>
  <div id="cid_31" class="form-input" data-layout="half"> 
      <span class="form-sub-label-container" style="vertical-align:top">
      <select class=" form-readonly form-dropdown" id="depen3city" onchange="updatedepen3Hospitals()" name="depen3q20_address[city]" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="label_31 sublabel_input_31">
                  <script src="./city.js"></script>
              </select>

</li> -->

      <li class="form-line " data-type="control_dropdown" id="depen3id_31"><label class="form-label form-label-left form-label-auto" id="depen3label_31" for="depen3input_31"> Preferred Hospitals </label>
        <div id="depen3cid_31" class="form-input " data-layout="half"> 
            <span class="form-sub-label-container" style="vertical-align:top">
            <select class=" form-readonly form-dropdown " id="depen3input_31x" name="depen3q31_hospitalsx" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="depen3label_31 subdepen3label_depen3input_31">
                      <!-- <datalist id="depen3input_31b">
                      <option value="">
                      <option value=""> 
                    </datalist> -->
                    <option value "<?=$Providerval;?>" selected="" ><?=$Providerval;?> </option>
                    
                </select>
            
            <label class="form-sub-label" for="depen3input_31" id="subdepen3label_depen3input_31" style="min-height:13px" aria-hidden="false">NB. You Must Choose your Plan Before The Hospital List Will Display</b>
                <br> You can type the <b>State</b>, <b>Location</b> or <b>Name of hospital</b> you want to choose from. choose from the displayed hospital list* </br>
                </label></span> 
            </div>
      </li>
      
      <script>
    let depen3HospitalChoices;

    document.addEventListener('DOMContentLoaded', function () {
        // Initialize Choices.js for depen3 hospital dropdown
        depen3HospitalChoices = new Choices('#depen3input_31x', {
            searchEnabled: true,
            searchPlaceholderValue: 'Search for a provider...',
            shouldSort: true
        });

        // Update hospitals when the state changes
        document.getElementById('depen3input_20_state').addEventListener('change', updatedepen3Hospitals);
    });

    function updatedepen3Hospitals() {
        var planType = document.getElementById('input_30').value;
        var state = document.getElementById('depen3input_20_state').value;
        var depen3HospitalDropdown = document.getElementById('depen3input_31x');

        // Clear the depen3 hospital dropdown
        depen3HospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

        if (state) {
            // Fetch the hospitals for the selected state
            fetch('get_hospitals.php?state=' + state + '&planType=' + planType)
                .then(response => response.json())
                .then(data => {
                    data.hospitals.forEach(provider_name => {
                        var option = document.createElement('option');
                        option.value = provider_name;
                        option.text = provider_name;
                        depen3HospitalDropdown.add(option);
                    });

                    // Reinitialize Choices.js for depen3 hospital dropdown
                    depen3HospitalChoices.setChoices([{
                        label: 'Choose a Provider',
                        value: '',
                        selected: true,
                        disabled: true
                    }].concat(data.hospitals.map(hospital => ({
                        label: hospital,
                        value: hospital
                    }))), 'value', 'label', true);
                })
                .catch(error => console.error('Error fetching hospitals:', error));
        }
    }
</script>
      <li class="form-line " data-type="control_dropdown" id="depen3id_genotype"><label class="form-label form-label-left form-label-auto" id="depen3label_genotype" for="depen3input_genotype"> Genotype </label>
        <div id="depen3cid_genotype" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen3input_genotype" name="depen3q_genotype" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="AA">AA</option>
            <option value="AC">AC</option>
            <option value="AS">AS</option>
            <option value="CC">CC</option>
            <option value="SC">SC</option>
            <option value="SS">SS</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen3id_bloodgroup"><label class="form-label form-label-left form-label-auto" id="depen3label_bloodgroup" for="depen3input_bloodgroup"> Blood Group </label>
        <div id="depen3cid_bloodgroup" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen3input_bloodgroup" name="depen3q_bloodgroup" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="A+">A+</option>
            <option value="A-">A-</option>
            <option value="B+">B+</option>
            <option value="B-">B-</option>
            <option value="AB+">AB-</option>
            <option value="AB_">AB+</option>
            <option value="O+">O+</option>
            <option value="O-">O-</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen3id_allergies"><label class="form-label form-label-left form-label-auto" id="depen3label_allergies" for="depen3input_allergies"> Allergies </label>
        <div id="depen3cid_allergies" class="form-input " data-layout="half"> <input type="text" id="depen3input_allergies" name="depen3q_allergies" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen3label_allergies" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen3id_Preextcon"><label class="form-label form-label-left form-label-auto" id="depen3label_Preextcon" for="depen3input_Preextcon"> Any Pre-Existing Condition? </label>
        <div id="depen3cid_Preextcon" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen3input_Preextcon" name="depen3q_Preextcon" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen3id_Preextconans"><label class="form-label form-label-left form-label-auto" id="depen3label_Preextconans" for="Preextconans"> If yes? Pre-Existing Condition <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="depen3cid_Preextconans" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen3input_Preextconans" name="depen3q_Preextconans" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" eg. hypertension, diabetes, asthma , etc" data-component="textbox" aria-labelledby="depen3label_Preextconans" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen3id_surgicalque"><label class="form-label form-label-left form-label-auto" id="depen3label_surgicalque" for="depen3input_surgicalque"> Any Surgical History? </label>
        <div id="depen3cid_surgicalque" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen3input_surgicalque" name="depen3q_surgicalque" style="width:310px" data-component="dropdown" required="" aria-label="surgicalque">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen3id_surgical"><label class="form-label form-label-left form-label-auto" id="depen3label_surgical" for="depen3input_surgical"> If yes? Surgical History<span class="form-required>"></span> </label>
        <div id="depen3cid_surgical" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen3input_surgical" name="depen3q_surgical" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen3label_surgical" /> </div>
      
       <li class="form-line " data-type="control_fileupload" id="depen3id_99">
        <label class="form-label form-label-left form-label-auto" id="depen3label_99" for="depen3input_99">
          Passport
          <span class="form-required">
            *
          </span>
        </label>
        <div id="depen3cid_99" class="form-input ">
          <span class="form-sub-label-container" style="vertical-align:top">
            <input type="file" id="depen3input_99" name="depen3q99_passport" class="form-upload " data-imagevalidate="yes" data-file-accept="jpg, jpeg, png, gif" data-file-maxsize="10240" data-file-minsize="0" data-file-limit="" data-component="fileupload" required="" />
            <label class="form-sub-label" for="depen3input_99" style="min-height:13px" aria-hidden="false"> Select passport photo from your device. Kindly note that the Maximum passport size is 5mb </label>
          </span>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_77">
        <div id="cid_77" class="form-input-wide" data-layout="full">
          <div id="text_77" class="form-html" data-component="text" tabindex="0">
            <p style="text-align: left;"><span style="font-size: 12pt; color: #ff0000;"><strong><strong>DEPENDENT 4<br /></strong></strong></span></p>
          </div>
        </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen4id_4"><label class="form-label form-label-left form-label-auto" id="depen4label_4" for="depen4input_4"> Surname </label>
        <div id="depen4cid_4" class="form-input " data-layout="half"> <input type="text" id="depen4input_4" name="depen4q4_surname" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen4label_4" required="" /> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen4id_26"><label class="form-label form-label-left form-label-auto" id="depen4label_26" for="depen4input_26"> First Name </label>
        <div id="depen4cid_26" class="form-input " data-layout="half"> <input type="text" id="depen4input_26" name="depen4q26_firstName" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen4label_26" required="" /> </div>
      </li>
      <li class="form-line" data-type="control_textbox" id="depen4id_27"><label class="form-label form-label-left form-label-auto" id="depen4label_27" for="depen4input_27"> Middle Name </label>
        <div id="depen4cid_27" class="form-input" data-layout="half"> <input type="text" id="depen4input_27" name="depen4q27_middleName" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen4label_27" /> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen4id_22"><label class="form-label form-label-left form-label-auto" id="depen4label_22" for="depen4input_22"> Gender </label>
        <div id="depen4cid_22" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen4input_22" name="depen4q22_gender" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Male">Male</option>
            <option value="Female">Female</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_email" id="depen4id_24"><label class="form-label form-label-left form-label-auto" id="depen4label_24" for="depen4input_24"> Email Address </label>
        <div id="depen4cid_24" class="form-input " data-layout="half"> <input type="email" id="depen4input_24" name="depen4q24_emailAddress" data-type="input-textbox" class="form-textbox validate[Email]" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen4label_24" /> </div>
      </li>
      <li class="form-line " data-type="control_birthdate" id="depen4id_9"><label class="form-label form-label-left form-label-auto" id="depen4label_9" for="depen4input_9"> Date of Birth </label>
        <div id="depen4cid_9" class="form-input " data-layout="full">
          <div data-wrapper-react="true"><span class="form-sub-label-container" style="vertical-align:top"><select name="depen4q9_dateOf[day]" id="depen4input_9_day" class="form-dropdown " data-component="birthdate-day" aria-labelledby="depen4label_9 subdepen4label_9_day">
                <option></option>
                <option value="01">1</option>
                <option value="02">2</option>
                <option value="03">3</option>
                <option value="04">4</option>
                <option value="05">5</option>
                <option value="06">6</option>
                <option value="07">7</option>
                <option value="08">8</option>
                <option value="09">9</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
                <option value="20">20</option>
                <option value="21">21</option>
                <option value="22">22</option>
                <option value="23">23</option>
                <option value="24">24</option>
                <option value="25">25</option>
                <option value="26">26</option>
                <option value="27">27</option>
                <option value="28">28</option>
                <option value="29">29</option>
                <option value="30">30</option>
                <option value="31">31</option>
              </select><label class="form-sub-label" for="depen4input_9_day" id="subdepen4label_9_day" style="min-height:13px" aria-hidden="false">Day</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen4q9_dateOf[month]" id="depen4input_9_month" class="form-dropdown " data-component="birthdate-month" aria-labelledby="depen4label_9 subdepen4label_9_month">
                <option></option>
                <option value="01">January</option>
                <option value="02">February</option>
                <option value="03">March</option>
                <option value="04">April</option>
                <option value="05">May</option>
                <option value="06">June</option>
                <option value="07">July</option>
                <option value="08">August</option>
                <option value="09">September</option>
                <option value="10">October</option>
                <option value="11">November</option>
                <option value="12">December</option>
              </select><label class="form-sub-label" for="depen4input_9_month" id="subdepen4label_9_month" style="min-height:13px" aria-hidden="false">Month</label></span><span class="form-sub-label-container" style="vertical-align:top"><select name="depen4q9_dateOf[year]" id="depen4input_9_year" class="form-dropdown " data-component="birthdate-year" aria-labelledby="depen4label_9 subdepen4label_9_year">
                <option></option>
                <option value="2023">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>
                <option value="2019">2019</option>
                <option value="2018">2018</option>
                <option value="2017">2017</option>
                <option value="2016">2016</option>
                <option value="2015">2015</option>
                <option value="2014">2014</option>
                <option value="2013">2013</option>
                <option value="2012">2012</option>
                <option value="2011">2011</option>
                <option value="2010">2010</option>
                <option value="2009">2009</option>
                <option value="2008">2008</option>
                <option value="2007">2007</option>
                <option value="2006">2006</option>
                <option value="2005">2005</option>
                <option value="2004">2004</option>
                <option value="2003">2003</option>
                <option value="2002">2002</option>
                <option value="2001">2001</option>
                <option value="2000">2000</option>
                <option value="1999">1999</option>
                <option value="1998">1998</option>
                <option value="1997">1997</option>
                <option value="1996">1996</option>
                <option value="1995">1995</option>
                <option value="1994">1994</option>
                <option value="1993">1993</option>
                <option value="1992">1992</option>
                <option value="1991">1991</option>
                <option value="1990">1990</option>
                <option value="1989">1989</option>
                <option value="1988">1988</option>
                <option value="1987">1987</option>
                <option value="1986">1986</option>
                <option value="1985">1985</option>
                <option value="1984">1984</option>
                <option value="1983">1983</option>
                <option value="1982">1982</option>
                <option value="1981">1981</option>
                <option value="1980">1980</option>
                <option value="1979">1979</option>
                <option value="1978">1978</option>
                <option value="1977">1977</option>
                <option value="1976">1976</option>
                <option value="1975">1975</option>
                <option value="1974">1974</option>
                <option value="1973">1973</option>
                <option value="1972">1972</option>
                <option value="1971">1971</option>
                <option value="1970">1970</option>
                <option value="1969">1969</option>
                <option value="1968">1968</option>
                <option value="1967">1967</option>
                <option value="1966">1966</option>
                <option value="1965">1965</option>
                <option value="1964">1964</option>
                <option value="1963">1963</option>
                <option value="1962">1962</option>
                <option value="1961">1961</option>
                <option value="1960">1960</option>
                <option value="1959">1959</option>
                <option value="1958">1958</option>
                <option value="1957">1957</option>
                <option value="1956">1956</option>
                <option value="1955">1955</option>
                <option value="1954">1954</option>
                <option value="1953">1953</option>
                <option value="1952">1952</option>
                <option value="1951">1951</option>
                <option value="1950">1950</option>
                <option value="1949">1949</option>
                <option value="1948">1948</option>
                <option value="1947">1947</option>
                <option value="1946">1946</option>
                <option value="1945">1945</option>
                <option value="1944">1944</option>
                <option value="1943">1943</option>
                <option value="1942">1942</option>
                <option value="1941">1941</option>
                <option value="1940">1940</option>
                <option value="1939">1939</option>
                <option value="1938">1938</option>
                <option value="1937">1937</option>
                <option value="1936">1936</option>
                <option value="1935">1935</option>
                <option value="1934">1934</option>
                <option value="1933">1933</option>
                <option value="1932">1932</option>
                <option value="1931">1931</option>
                <option value="1930">1930</option>
                <option value="1929">1929</option>
                <option value="1928">1928</option>
                <option value="1927">1927</option>
                <option value="1926">1926</option>
                <option value="1925">1925</option>
                <option value="1924">1924</option>
                <option value="1923">1923</option>
                <option value="1922">1922</option>
                <option value="1921">1921</option>
                <option value="1920">1920</option>
              </select><label class="form-sub-label" for="depen4input_9_year" id="subdepen4label_9_year" style="min-height:13px" aria-hidden="false">Year</label></span></div>
        </div>
      </li>
      
      <li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> State</label>
  <div id="cid_20" class="form-input" data-layout="full">
  <select class="form-dropdown" id="depen4input_20_state" onchange="updatedepen4Hospitals()" name="depen4q20_address[state]"
                      required>
                      <option selected disabled>Select State</option>
                      <option value="Abia">Abia</option>
                      <option value="Adamawa">Adamawa</option>
                      <option value="Abuja">Abuja</option>
                      <option value="AkwaIbom">Akwa Ibom</option>
                      <option value="Anambra">Anambra</option>
                      <option value="Bauchi">Bauchi</option>
                      <option value="Bayelsa">Bayelsa</option>
                      <option value="Benue">Benue</option>
                      <option value="Borno">Borno</option>
                      <option value="CrossRiver">Cross River</option>
                      <option value="Delta">Delta</option>
                      <option value="Ebonyi">Ebonyi</option>
                      <option value="Edo">Edo</option>
                      <option value="Ekiti">Ekiti</option>
                      <option value="Enugu">Enugu</option>
                      <option value="Gombe">Gombe</option>
                      <option value="Imo">Imo</option>
                      <option value="Jigawa">Jigawa</option>
                      <option value="Kaduna">Kaduna</option>
                      <option value="Kano">Kano</option>
                      <option value="Katsina">Katsina</option>
                      <option value="Kebbi">Kebbi</option>
                      <option value="Kogi">Kogi</option>
                      <option value="Kwara">Kwara</option>
                      <option value="Lagos">Lagos</option>
                      <option value="Nassarawa">Nassarawa</option>
                      <option value="Niger">Niger</option>
                      <option value="Ogun">Ogun</option>
                      <option value="Ondo">Ondo</option>
                      <option value="Osun">Osun</option>
                      <option value="Oyo">Oyo</option>
                      <option value="Plateau">Plateau</option>
                      <option value="Rivers">Rivers</option>
                      <option value="Sokoto">Sokoto</option>
                      <option value="Taraba">Taraba</option>
                      <option value="Yobe">Yobe</option>
                      <option value="Zamfara">Zamfara</option>
                  </select><label class="form-sub-label" for="input_20_state" id="sublabel_20_state" style="min-height:13px" aria-hidden="false">State</label></span></span>
      <!--<div class="form-address-line-wrapper jsTest-address-line-wrapperField"><span class="form-address-line form-address-zip-line jsTest-address-lineField "><span class="form-sub-label-container" style="vertical-align:top">
          
          
          <select class="form-dropdown validate[required]" name="q20_address[postal]" onchange="populatecity()" id="input_20_postal">
                      <option selected disabled>Select Local Government</option>
                  </select>
                  <script src="./statelga.js"></script>
          
          <label class="form-sub-label" for="input_20_postal" id="sublabel_20_postal" style="min-height:13px" aria-hidden="false">LGA</label></span></span></div>
    </div> -->





<!-- <li class="form-line" data-type="control_dropdown" id="id_31"><label class="form-label form-label-left form-label-auto" id="label_31" for="input_31"> City </label>
  <div id="cid_31" class="form-input" data-layout="half"> 
      <span class="form-sub-label-container" style="vertical-align:top">
      <select class=" form-readonly form-dropdown" id="depen4city" onchange="updatedepen4Hospitals()" name="depen4q20_address[city]" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="label_31 sublabel_input_31">
                  <script src="./city.js"></script>
              </select>

</li> -->
      <li class="form-line " data-type="control_dropdown" id="depen4id_31"><label class="form-label form-label-left form-label-auto" id="depen4label_31" for="depen4input_31"> Preferred Hospitals </label>
        <div id="depen4cid_31" class="form-input " data-layout="half"> 
            <span class="form-sub-label-container" style="vertical-align:top">
            <select class=" form-readonly form-dropdown " id="depen4input_31x" name="depen4q31_hospitalsx" style="width:310px" data-component="dropdown" required="" value="<?=$Providerval;?>" aria-labelledby="depen4label_31 subdepen4label_depen4input_31">
                      <!-- <datalist id="depen4input_31b">
                      <option value="">
                      <option value=""> 
                    </datalist> -->
                    <option value "<?=$Providerval;?>" selected="" ><?=$Providerval;?> </option>
                    
                </select>
            
            <label class="form-sub-label" for="depen4input_31" id="subdepen4label_depen4input_31" style="min-height:13px" aria-hidden="false">NB. You Must Choose your Plan Before The Hospital List Will Display</b>
                <br> You can type the <b>State</b>, <b>Location</b> or <b>Name of hospital</b> you want to choose from. choose from the displayed hospital list* </br>
                </label></span> 
            </div>
      </li>
      <script>
    let depen4HospitalChoices;

    document.addEventListener('DOMContentLoaded', function () {
        // Initialize Choices.js for depen4 hospital dropdown
        depen4HospitalChoices = new Choices('#depen4input_31x', {
            searchEnabled: true,
            searchPlaceholderValue: 'Search for a provider...',
            shouldSort: true
        });

        // Update hospitals when the state changes
        document.getElementById('depen4input_20_state').addEventListener('change', updatedepen4Hospitals);
    });

    function updatedepen4Hospitals() {
        var planType = document.getElementById('input_30').value;
        var state = document.getElementById('depen4input_20_state').value;
        var depen4HospitalDropdown = document.getElementById('depen4input_31x');

        // Clear the depen4 hospital dropdown
        depen4HospitalDropdown.innerHTML = '<option value="">Select a Provider</option>';

        if (state) {
            // Fetch the hospitals for the selected state
            fetch('get_hospitals.php?state=' + state + '&planType=' + planType)
                .then(response => response.json())
                .then(data => {
                    data.hospitals.forEach(provider_name => {
                        var option = document.createElement('option');
                        option.value = provider_name;
                        option.text = provider_name;
                        depen4HospitalDropdown.add(option);
                    });

                    // Reinitialize Choices.js for depen4 hospital dropdown
                    depen4HospitalChoices.setChoices([{
                        label: 'Choose a Provider',
                        value: '',
                        selected: true,
                        disabled: true
                    }].concat(data.hospitals.map(hospital => ({
                        label: hospital,
                        value: hospital
                    }))), 'value', 'label', true);
                })
                .catch(error => console.error('Error fetching hospitals:', error));
        }
    }
</script>
      <li class="form-line " data-type="control_dropdown" id="depen4id_genotype"><label class="form-label form-label-left form-label-auto" id="depen4label_genotype" for="depen4input_genotype"> Genotype </label>
        <div id="depen4cid_genotype" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen4input_genotype" name="depen4q_genotype" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="AA">AA</option>
            <option value="AC">AC</option>
            <option value="AS">AS</option>
            <option value="CC">CC</option>
            <option value="SC">SC</option>
            <option value="SS">SS</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_dropdown" id="depen4id_bloodgroup"><label class="form-label form-label-left form-label-auto" id="depen4label_bloodgroup" for="depen4input_bloodgroup"> Blood Group </label>
        <div id="depen4cid_bloodgroup" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen4input_bloodgroup" name="depen4q_bloodgroup" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="A+">A+</option>
            <option value="A-">A-</option>
            <option value="B+">B+</option>
            <option value="B-">B-</option>
            <option value="AB+">AB-</option>
            <option value="AB_">AB+</option>
            <option value="O+">O+</option>
            <option value="O-">O-</option>
            
          </select> </div>
      </li>
      <li class="form-line " data-type="control_textbox" id="depen4id_allergies"><label class="form-label form-label-left form-label-auto" id="depen4label_allergies" for="depen4input_allergies"> Allergies </label>
        <div id="depen4cid_allergies" class="form-input " data-layout="half"> <input type="text" id="depen4input_allergies" name="depen4q_allergies" data-type="input-textbox" class="form-textbox " data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen4label_allergies" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen4id_Preextcon"><label class="form-label form-label-left form-label-auto" id="depen4label_Preextcon" for="depen4input_Preextcon"> Any Pre-Existing Condition? </label>
        <div id="depen4cid_Preextcon" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen4input_Preextcon" name="depen4q_Preextcon" style="width:310px" data-component="dropdown" required="" aria-label="Gender">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen4id_Preextconans"><label class="form-label form-label-left form-label-auto" id="depen4label_Preextconans" for="Preextconans"> If yes? Pre-Existing Condition <span class ="form-required">
            <?=$reqicon;?>
        </span> </label>
        <div id="depen4cid_Preextconans" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen4input_Preextconans" name="depen4q_Preextconans" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" eg. hypertension, diabetes, asthma , etc" data-component="textbox" aria-labelledby="depen4label_Preextconans" /> </div>
      </li>
      
      <li class="form-line " data-type="control_dropdown" id="depen4id_surgicalque"><label class="form-label form-label-left form-label-auto" id="depen4label_surgicalque" for="depen4input_surgicalque"> Any Surgical History? </label>
        <div id="depen4cid_surgicalque" class="form-input " data-layout="half"> <select class="form-dropdown " id="depen4input_surgicalque" name="depen4q_surgicalque" style="width:310px" data-component="dropdown" required="" aria-label="surgicalque">
            <option value="">Please Select</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select> </div>
      </li>
      
      <li class="form-line" data-type="control_textbox" id="depen4id_surgical"><label class="form-label form-label-left form-label-auto" id="depen4label_surgical" for="depen4input_surgical"> If yes? Surgical History<span class="form-required>"></span> </label>
        <div id="depen4cid_surgical" class="<?=$formreqrequired;?>" data-layout="half"> <input type="text" id="depen4input_surgical" name="depen4q_surgical" data-type="input-textbox" class="form-textbox" data-defaultvalue="" style="width:310px" size="310" value="" placeholder=" " data-component="textbox" aria-labelledby="depen4label_surgical" /> </div>
      
       <li class="form-line " data-type="control_fileupload" id="depen4id_99">
        <label class="form-label form-label-left form-label-auto" id="depen4label_99" for="depen4input_99">
          Passport
          <span class="form-required">
            *
          </span>
        </label>
        <div id="depen4cid_99" class="form-input ">
          <span class="form-sub-label-container" style="vertical-align:top">
            <input type="file" id="depen4input_99" name="depen4q99_passport" class="form-upload " data-imagevalidate="yes" data-file-accept="jpg, jpeg, png, gif" data-file-maxsize="10240" data-file-minsize="0" data-file-limit="" data-component="fileupload" required="" />
            <label class="form-sub-label" for="depen4input_99" style="min-height:13px" aria-hidden="false"> Select passport photo from your device. Kindly note that the Maximum passport size is 5mb </label>
          </span>
        </div>
      </li>
      <!-- <li class="form-line" data-type="control_checkbox" id="id_86"><label class="form-label form-label-left form-label-auto" id="label_86" for="input_86"> By clicking SUBMIT you are agreeing to share your information with us. </label>
        <div id="cid_86" class="form-input" data-layout="full">
          <div class="form-multiple-column" data-columncount="2" role="group" aria-labelledby="label_86" data-component="checkbox"><span class="form-checkbox-item"><span class="dragger-item"></span><input type="checkbox" aria-describedby="label_86" class="form-checkbox" id="input_86_0" name="q86_name86[]" value="I agree." /><label id="label_input_86_0" for="input_86_0">I agree.</label></span></div>
        </div>
      </li> -->
      <li class="form-line" data-type="control_button" id="id_2">
        <div id="cid_2" class="form-input-wide" data-layout="full">
          <div data-align="center" class="form-buttons-wrapper form-buttons-center   jsTest-button-wrapperField"><span> </span><button id="input_print_2" type="button" class="form-submit-print form-submit-button-reports-400 jf-form-buttons" data-component="button"><img src="https://cdn.jotfor.ms/images/printer.png" style="vertical-align:middle" alt="Print" /><span id="span_print_2" class="span_print">Print Form</span></button><button id="input_2" type="submit" class="form-submit-button form-submit-button-reports-400 submit-button jf-form-buttons jsTest-submitField" data-component="button" data-content="">Submit Form</button></div>
        </div>
      </li>
      <li style="display:none">Should be Empty: <input type="text" name="website" value="" /></li>
    </ul>
  </div>
   
  <script>
    JotForm.showJotFormPowered = "0";
  </script>
  <script>
    JotForm.poweredByText = "Powered by Jotform";
  </script><input type="hidden" class="simple_spc" id="simple_spc" name="simple_spc" value="202932287096562" />
  <script type="text/javascript">
    var all_spc = document.querySelectorAll("form[id='202932287096562'] .si" + "mple" + "_spc");
    for (var i = 0; i < all_spc.length; i++)
    {
      all_spc[i].value = "202932287096562-202932287096562";
    }
  </script>
</form></body>

<script src="./Script.js"></script>

<script type="text/javascript">
var plntpa='<?php echo addslashes($plntpa);?>';
var plnreferal='';
var plnbanda='<?php echo addslashes($plnbanda);?>';
var plnbandb='<?php echo addslashes($plnbandb);?>';
var plnbandc='<?php echo addslashes($plnbandc);?>';
var plnbandd='<?php echo addslashes($plnbandd);?>'; 
var plnbridgegap='<?php echo addslashes($plnbridgegap);?>';
var plnidlp='<?php echo addslashes($plnidlp);?>';
var plnidlc='<?php echo addslashes($plnidlc);?>';
var changedfoundation='<?php echo addslashes($changedfoundation);?>';
var platinumtincan='<?php echo addslashes($platinumtincan);?>';
var goldplustincan='<?php echo addslashes($goldplustincan);?>';
var plndiagnostics='';
var plnent='';
var plngoldc='';
var plndental='';
var plnoptical='';
var plnall='';
var plnnil='<option value=""></option>';
document.getElementById('input_30').addEventListener('change', function() {
	var patrq = this.value;
	var patrv = document.getElementById('input_98').value;
	document.getElementById('input_31b').innerHTML= plnbandd;
	document.getElementById('input_58b').innerHTML= plnnil+plnbandd;
	document.getElementById('input_90b').innerHTML= plnnil+plnbandd;
	document.getElementById('input_92b').innerHTML= plnnil+plnbandd;
	document.getElementById('input_94b').innerHTML= plnnil+plnbandd;
	document.getElementById('input_96b').innerHTML= plnnil+plnbandd;
	if (patrv.trim() =='CHANGED FOUNDATION'){
		document.getElementById('input_31b').innerHTML= changedfoundation;
	document.getElementById('input_58b').innerHTML= plnnil+changedfoundation;
	document.getElementById('input_90b').innerHTML= plnnil+changedfoundation;
	document.getElementById('input_92b').innerHTML= plnnil+changedfoundation;
	document.getElementById('input_94b').innerHTML= plnnil+changedfoundation;
	document.getElementById('input_96b').innerHTML= plnnil+changedfoundation;
	document.getElementById('input_30b').value='Social Plan';
	}
	}/*else if (patrv.trim() =='CAPITALFIELD INVESTMENT GROUP LIMITED'){
	document.getElementById('input_31b').innerHTML= plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_58b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_90b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_92b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_94b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_96b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	}*/else if (patrq =='Platinum Plan') {
		document.getElementById('input_31b').innerHTML= plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_58b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_90b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_92b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_94b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_96b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	}else if (patrq.trim() =='Flex Plan'){
		document.getElementById('input_31b').innerHTML= plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_58b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_90b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_92b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_94b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_96b').innerHTML= plnnil+plntpa+plnbanda+plnbandb+plnbandc+plnbandd;
	}else if (patrq.trim() =='Executive Plan'){
		document.getElementById('input_31b').innerHTML= plntpa+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_58b').innerHTML= plnnil+plntpa+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_90b').innerHTML= plnnil+plntpa+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_92b').innerHTML= plnnil+plntpa+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_94b').innerHTML= plnnil+plntpa+plnbandb+plnbandc+plnbandd;
	document.getElementById('input_96b').innerHTML= plnnil+plntpa+plnbandb+plnbandc+plnbandd;
	}else if (patrq.trim() =='Upper Plan'){
		document.getElementById('input_31b').innerHTML= plntpa+plnbandc+plnbandd;
	document.getElementById('input_58b').innerHTML= plnnil+plntpa+plnbandc+plnbandd;
	document.getElementById('input_90b').innerHTML= plnnil+plntpa+plnbandc+plnbandd;
	document.getElementById('input_92b').innerHTML= plnnil+plntpa+plnbandc+plnbandd;
	document.getElementById('input_94b').innerHTML= plnnil+plntpa+plnbandc+plnbandd;
	document.getElementById('input_96b').innerHTML= plnnil+plntpa+plnbandc+plnbandd;
	}
	}else if (patrv.trim() =='TINCAN ISLAND CONTAINERS TERMINAL (TICT)' && patrq.trim() =='Executive Plan'){
		document.getElementById('input_31b').innerHTML= goldplustincan;
	document.getElementById('input_58b').innerHTML= plnnil+goldplustincan;
	document.getElementById('input_90b').innerHTML= plnnil+goldplustincan;
	document.getElementById('input_92b').innerHTML= plnnil+goldplustincan;
	document.getElementById('input_94b').innerHTML= plnnil+goldplustincan;
	document.getElementById('input_96b').innerHTML= plnnil+goldplustincan;
	document.getElementById('input_30b').value=patrq.trim();
	}
	
	var options = $('datalist#input_31b option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });
 //2   
    var options = $('datalist#input_58b option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });
    //3
    var options = $('datalist#input_90b option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });
    //4
    var options = $('datalist#input_92b option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });
    //5
    var options = $('datalist#input_94b option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });
    //6
    var options = $('datalist#input_96b option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });
});

</script>


</html><script type="text/javascript">JotForm.ownerView=true;</script><script src="https://cdn.jotfor.ms//js/vendor/smoothscroll.min.js?v=3.3.41599"></script>
<script src="https://cdn.jotfor.ms//js/errorNavigation.js?v=3.3.41599"></script>
