 
<?php $__env->startSection('title', 'Form Components'); ?>
<?php $__env->startSection('content'); ?>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css"/>  
  <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">  
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<?php
    $adminuserid = auth()->user()->id;
    $adminstatecode = auth()->user()->state_code;
    $admindistcode = auth()->user()->dist_code;
    $adminname = auth()->user()->name;
    $adminserialno = auth()->user()->serial_number;
    
    $outreachcoorname = DB::table('employee_master')->where('dist_code',$admindistcode)->where('state_code',$adminstatecode)->get();
    
    $artnames = DB::table('art_centre_master')->where('dist_code',$admindistcode)->where('state_code',$adminstatecode)->get();
    $subtypologys = DB::table('sub_typology_master')->get();
   
    $usersuppersec = DB::table('master_fields_table')->where('form_name','=','client_register')->where('status','=','1')->get();
    // print_r($usersuppersec); die();
    
    $usersconsent = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','Verbal_consent_status')->where('status','=','1')->get();
    
    $clientprofile = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','Client_Profile')->where('status','=','1')->get();
    
    $infopertaining = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','Information_pertaining')->where('status','=','1')->get();
    
    $riskprofile = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','Risk_profile')->where('status','=','1')->get();
    
    $riskprofilec2 = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','Risk_profile_c2')->where('status','=','1')->get();
    
    $hivtest = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','hiv_test_treatment_status')->where('status','=','1')->get();
    
    $matostservice = DB::table('master_fields_table')->where('form_name','=','client_register')->where('section_name','=','mat_ost_services')->where('status','=','1')->get();

    $sitenamelist = DB::table('client_register_form_entry')->select('sitename')->groupBy('sitename')->get();
    
    $itnamelist = DB::table('client_register_form_entry')->select('nameit')->groupBy('nameit')->get();
   
    $lastid = DB::table('client_register_form_entry')->orderBy('id', 'desc')->limit(1)->get();
    
?>
 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/css/bootstrap-datetimepicker.min.css">
    <div class="container-fluid">
        <div class="page-header">
            <div class="row align-items-end">
                <div class="col-lg-8">
                    <div class="page-header-title">
                        <i class="ik ik-edit bg-blue"></i>
                        <div class="d-inline">
                            <h5><?php echo e(__('Client Registration Form')); ?></h5>
                            <span><?php echo e(__('EJAF')); ?></span>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4">
                    <nav class="breadcrumb-container" aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a href="<?php echo e(route('dashboard')); ?>"><i class="ik ik-home"></i></a>
                            </li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('Client Registration Form')); ?></li>
                        </ol>
                    </nav>
                </div>
                <?php if(session()->has('message')): ?>
                    <div class="alert alert-success" style='margin-left: 1%;
    margin-top: 25px;'>
                        <?php echo e(session()->get('message')); ?>

                    </div>
                <?php endif; ?>
                <?php if(session()->has('errormsg')): ?>
                    <div class="alert alert-danger" style='margin-left: 1%;
    margin-top: 25px;'>
                        <?php echo e(session()->get('errormsg')); ?>

                    </div>
                <?php endif; ?>
            </div>
        </div>
       
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <!--<div class="card-header"><h3><?php echo e(__('Default form')); ?></h3></div>-->
                    <div class="card-body">
                        <form class="forms-sample" method='POST' <?php if(!empty($showdata) && $showdata[0]->formstatus == 'pending'): ?> action='<?php echo e(url('updateclientregister')); ?>' <?php elseif(!empty($showdata) && $showdata[0]->formstatus == 'success'): ?> action='<?php echo e(url('updateclientregistersuccess')); ?>' <?php else: ?> action='<?php echo e(url('loginregclient')); ?>' <?php endif; ?> name='clientregisterform'>
                            <?php echo csrf_field(); ?>
                            
                            
                            <?php if(!empty($showdata)): ?>
                            <input type='hidden' name='client_reg_id' value='<?php echo e($showdata[0]->id); ?>'>
                            <?php endif; ?>
                            
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="outreachcoordinate"><?php echo $usersuppersec[0]->questions; ?></label>
                                        <select name='outreachcoordinate' style="text-transform: uppercase" class='form-control' >
                                            <?php if(empty($showdata)): ?>
                                            <option value=''>Select Outreach Worker</option>
                                            <?php endif; ?>
                                            <?php $__currentLoopData = $outreachcoorname; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $outreachcoorn): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($outreachcoorn->emp_name); ?>" <?php if(!empty($showdata)): ?> <?php echo e($showdata[0]->outreachcoordinate == $outreachcoorn->emp_name  ? 'selected' : ''); ?> <?php endif; ?>><?php echo e($outreachcoorn->emp_name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                       
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="registerdate"><?php echo $usersuppersec[1]->questions; ?></label>
                                        <div class='input-group date datetimepicker' >
                                        <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->registerdate); ?>' <?php endif; ?> class="form-control" name="registerdate" placeholder="yyyy-mm-dd" />
                                        <span class="input-group-addon">
                                          <span class="glyphicon glyphicon-calendar"></span>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="note"><?php echo $usersuppersec[2]->questions; ?></label>
                            </div>    
                            <table class="table table-bordered">
                                <tr>
                                    <th colspan="6"><?php echo e(__('A. Verbal consent status:
(All information about the program activities, benefits and risk (if any) has to be provided to the client before getting his/her 
consent and registration in the project.)')); ?></th>
                                </tr>
                                </table>
                                <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[0]->number_order; ?>
                                    <?php echo $usersconsent[0]->questions; ?></label>
                                    <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->clientname); ?>' <?php endif; ?> placeholder="Click or tap here to enter text." name="clientname" class="form-control">
                                    </div>
                                    </div>
                                    </div>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[1]->number_order; ?>
                                    <?php echo $usersconsent[1]->questions; ?></label>
                                    <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->clientnickname); ?>' <?php endif; ?> placeholder="Click or tap here to enter text." name="clientnickname" class="form-control">
                                    </div>
                                    </div>
                                    </div>
                                     <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[2]->number_order; ?>
                                    <?php echo $usersconsent[2]->questions; ?></label>
                                    <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->contactprimary); ?>' <?php endif; ?> placeholder="" class="form-control" maxlength="10" onkeypress=" return isNumber(event)" id="primarymobileno" name="contactprimary">
                                    </div>
                                    </div>
                                    </div>
                                    <span id="check-mobile-status" style='color:red;'></span>
                                     <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[3]->number_order; ?>
                                    <?php echo $usersconsent[3]->questions; ?></label>
                                    <input type='text' maxlength="10" onkeypress=" return isNumber(event)" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->contactalternate); ?>' <?php endif; ?> placeholder="" name="contactalternate" class="form-control">
                                </div>
                                    </div>
                                    </div>
                                     <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[4]->number_order; ?>
                                    <?php echo $usersconsent[4]->questions; ?></label>
                                    
                                    <textarea style="text-transform: uppercase" name="address" rows="4" class="form-control" cols="60"  placeholder=''><?php if(!empty($showdata)): ?><?php echo e($showdata[0]->address); ?> <?php endif; ?></textarea>
                                    </div>
                                    </div>
                                    </div>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[5]->number_order; ?>
                                    <?php echo $usersconsent[5]->questions; ?></label>
                                    <?php $verbalconsents = explode('|',$usersconsent[5]->answer); ?>
                                    
                                        <?php foreach($verbalconsents as $verbalconsent){ ?>
                                        <input type='radio'  value="<?php echo $verbalconsent; ?>"  name="verbalconsent" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->verbalconsent == $verbalconsent)? "checked" : ""); ?> <?php endif; ?>><?php echo $verbalconsent; ?>
                                        <?php } ?>
                                   </div>
                                    </div>
                                    </div>      
                                    
                                <div class='a5'>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $usersconsent[6]->number_order; ?>
                                    <?php echo $usersconsent[6]->questions; ?></label></br>
                                    <?php $refusals = explode('|',$usersconsent[6]->answer); ?>
                                    
                                        <?php foreach($refusals as $refusal){ ?>
                                            <input type='radio'  value="<?php echo $refusal; ?>" name="refusal"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->refusal == $refusal)? "checked" : ""); ?> <?php endif; ?>><?php echo $refusal; ?></br>
                                            
                                        <?php } ?>
                                    </div>
                                    </div>
                                    </div>  
                                    </div>
                                <div class='a5a' style='display:none'>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo e(__('A5a')); ?>

                                    <?php echo e(__('Specify other…)')); ?></label>
                                    
                                        <input type='text' class="form-control" style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->a5aspecifyother); ?>' <?php endif; ?> placeholder="" name="a5aspecifyother"><br>
                                     </div>
                                    </div>
                                    </div>  
                                    </div>
                                <div class='a6'>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo e(__('A6')); ?></td>
                                    <?php echo e(__('Date of next follow up (if willing to participate later)')); ?></label>
                                    
                                        <div class='input-group date datetimepickerfuture'>
                                        <input type='text' class="form-control" name="datenextfollowup" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->datenextfollowup); ?>' <?php endif; ?> placeholder="yyyy-mm-dd" />
                                        <span class="input-group-addon">
                                          <span class="glyphicon glyphicon-calendar"></span>
                                        </span>
                                        </div>
                                        </div>
                                    </div>  
                                    </div>
                                        <br>
                                    
                            
                            <div class="form-group" style="text-align:center;">
                                <label for="note"><h5><?php echo e(__('(Once the verbal consent obtained the ID no. will be provided to the client)')); ?></h5></label>
                            </div>    
                            <div class="row">
                                <div class="col-md-2">
                                    <div class="form-group" style='text-align:right;top-margin:2px;'>
                                        <label><b><?php echo e(__('UID*')); ?></b></label>
                                    </div>
                                </div>
                                <div class="col-md-5">
                                    <div class="form-group">
                                        <table class='table table-bordered'>
                                            <tr>
                                                <td colspan='2'><?php if($adminuserid){ echo $adminstatecode; } ?></td>
                                                <td colspan='3'><?php if($adminuserid){ echo $admindistcode; } ?></td>
                                        <td colspan='4'><?php if(!empty($showdata)){ ?> <?php echo e($showdata[0]->serialno); ?> <?php }else{ ?><span id='sno'></span><?php } ?></td>
                                        <input type='hidden' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->serialno); ?>' <?php }else{ ?>id='serialno' value='' <?php } ?> name='serialno' >
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="col-md-5">
                                    <div class="form-group">
                                        <label for="uidregisterdate"><?php echo e(__('Date of Registration**')); ?></label>
                                        <div class='input-group date datetimepicker' >
                                        <input type='text' class="form-control" name="uidregisterdate" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->uidregisterdate); ?>' <?php endif; ?> placeholder="yyyy-mm-dd" />
                                        <span class="input-group-addon">
                                          <span class="glyphicon glyphicon-calendar"></span>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="bsection">
                            <table class="table table-bordered">
                                <tr>
                                    <th colspan="6"><strong><?php echo e(__('B. Client Profile')); ?></strong></th>
                                </tr>
                                </table>
                               
                               <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $clientprofile[0]->number_order; ?>
                                    <?php echo $clientprofile[0]->questions; ?></label>
                                    <span id="check-num-age" style='color:red;'></span>
                                    <input type="number" id='numage'  maxlength="2" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->age); ?>' <?php endif; ?> name="age" class="form-control" required>
                                    </div>
                                    </div>
                                    </div>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $clientprofile[1]->number_order; ?>
                                    <?php echo $clientprofile[1]->questions; ?></label></br>
                                    <?php $genders = explode('|',$clientprofile[1]->answer); ?>
                                    
                                        <?php foreach($genders as $gender){ ?>
                                            <input type='radio' value="<?php echo $gender; ?>" class="form-contol" name="gender" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->gender == $gender)? "checked" : ""); ?> <?php endif; ?>><?php echo $gender; ?><br>
                                            
                                        <?php } ?>
                                        </div>
                                    </div>
                                    </div>
                                     <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                        <span class='b2specifyother' style='display:none'>
                                        <label><?php echo e(__('Specify Other')); ?></label>
                                        <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->genderspecifyother); ?>' <?php endif; ?> style="text-transform: uppercase" name='genderspecifyother' class="form-control">
                                        </span>
                                     </div>
                                    </div>
                                    </div>
                                
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $clientprofile[2]->number_order; ?><?php echo $clientprofile[2]->questions; ?></label>
                                    <td><input type='text' style="text-transform: uppercase" <?php if($adminname): ?> value="<?php echo e($adminstatecode); ?>" <?php endif; ?> name="state" id='statecode' class="form-control" readonly>
                                     </div>
                                    </div>
                                    </div>
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $clientprofile[3]->number_order; ?><?php echo $clientprofile[3]->questions; ?></label>
                                    <input type='text' style="text-transform: uppercase" <?php if($adminname): ?> value="<?php echo e($admindistcode); ?>" <?php endif; ?> name="district" id='distcode' class="form-control" readonly>
                                    </div>
                                    </div>
                                    </div>
                                    
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                   <label><?php echo $clientprofile[4]->number_order; ?>
                                    <?php echo $clientprofile[4]->questions; ?></label>
                                    
                                        <input type='text' class="form-control" list="siteName" style="text-transform: uppercase" placeholder="Click or tap here to enter text" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->sitename); ?>' <?php endif; ?> name="sitename">
                                        <datalist id="siteName">
                                            <?php foreach($sitenamelist as $sitenl){ ?>
                                                <option value="<?php echo $sitenl->sitename; ?>" ><?php echo $sitenl->sitename; ?></option>
                                            <?php } ?>
                                        </datalist>
                                    </div>
                                    </div>
                                    </div>
                                    
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                                    <label><?php echo $clientprofile[5]->number_order; ?><?php echo $clientprofile[5]->questions; ?></label></br>
                                    <?php $catprimarys = explode('|',$clientprofile[5]->answer); ?>
                                    
                                        <?php foreach($catprimarys as $catprimary){ ?>
                                        <input type='radio' class='catpri' value="<?php echo $catprimary; ?>" name="catprimary" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->catprimary == $catprimary)? "checked" : ""); ?> <?php endif; ?>><?php echo $catprimary; ?><br>
                                        <?php } ?>
                                        </div>
                                    </div>
                                    </div>
                                    
                                    <div class="row">
                                    <div class="col-md-12">
                                   <div class="form-group">
                               
                                    <label><?php echo $clientprofile[6]->number_order; ?><?php echo $clientprofile[6]->questions; ?></label>
                                    
                                        <select name='subcat' class='form-control' id='b61subcat' style="text-transform: uppercase">
                                            <?php if(!empty($showdata)){ ?>
                                            <option  <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->subcat); ?>' <?php endif; ?>> <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->subcat); ?><?php endif; ?></option>
                                            <?php }else{ ?>
                                            <option> SELECT</option>
                                            <?php } ?>
                                       </select>
                                        
                                    </td>
                                    <td><?php echo $clientprofile[7]->number_order; ?></td>
                                    <td><?php echo $clientprofile[7]->questions; ?></td>
                                    <?php $enrolleds = explode('|',$clientprofile[7]->answer); ?>
                                    <td>
                                        <?php foreach($enrolleds as $enrolled){ ?>
                                        <input type='radio' value="<?php echo $enrolled; ?>" name="enrollintarget" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->enrollintarget == $enrolled)? "checked" : ""); ?> <?php endif; ?>><?php echo $enrolled; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='b71'><span class='b71'><?php echo $clientprofile[8]->number_order; ?></span></td>
                                    <td class='b71'><span class='b71'><?php echo $clientprofile[8]->questions; ?></span></td>
                                    <td class='b71'><span class='b71'>
                                        <input type='text' list='itName' style="text-transform: uppercase"  placeholder="Click or tap here to enter text." name="nameit" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->nameit); ?>' <?php endif; ?>>
                                        <datalist id="itName">
                                            <?php foreach($itnamelist as $itnl){ ?>
                                                <option value="<?php echo $itnl->nameit; ?>" ><?php echo $itnl->nameit; ?></option>
                                            <?php } ?>
                                        </datalist>
                                    </span></td>
                                    <td><?php echo $clientprofile[9]->number_order; ?></td>
                                    <td><?php echo $clientprofile[9]->questions; ?></td>
                                    <?php $edulevels = explode('|',$clientprofile[9]->answer); ?>
                                    <td>
                                        <?php foreach($edulevels as $edulevel){ ?>
                                            <input type='radio' value="<?php echo $edulevel; ?>" name="educationlevel" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->educationlevel == $edulevel)? "checked" : ""); ?> <?php endif; ?>><?php echo $edulevel; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td><?php echo $clientprofile[10]->number_order; ?></td>
                                    <td><?php echo $clientprofile[10]->questions; ?></td>
                                    <?php $empstatuss = explode('|',$clientprofile[10]->answer); ?>
                                    <td>
                                        <?php foreach($empstatuss as $empstatus){ ?>
                                        <input type='radio' value="<?php echo $empstatus; ?>" name="empleestatus" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->empleestatus == $empstatus)? "checked" : ""); ?> <?php endif; ?>><?php echo $empstatus; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td><?php echo $clientprofile[11]->number_order; ?></td>
                                    <td><?php echo $clientprofile[11]->questions; ?></td>
                                    <?php $maritalstatuss = explode('|',$clientprofile[11]->answer); ?>
                                    <td>
                                        <?php foreach($maritalstatuss as $maritalstatus){ ?>
                                            <input type='radio' value="<?php echo $maritalstatus; ?>" name="materialstatus" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->materialstatus == $maritalstatus)? "checked" : ""); ?> <?php endif; ?>><?php echo $maritalstatus; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <tr class='b91' style='display:none'>
                                        <td><?php echo e(__('B9.1')); ?></td>
                                        <td><?php echo e(__('Specify other')); ?></td>
                                        <td><input type='text' style="text-transform: uppercase"  <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b91specifyother); ?>' <?php endif; ?> name='b91specifyother'></td>
                                    </tr>
                                </tr>
                                <tr>
                                    <td><?php echo $clientprofile[12]->number_order; ?></td>
                                    <td><?php echo $clientprofile[12]->questions; ?></td>
                                    <?php $regpartners = explode('|',$clientprofile[12]->answer); ?>
                                    <td>
                                        <?php foreach($regpartners as $regpartner){ ?>
                                            <input type='radio' value="<?php echo $regpartner; ?>" name="regpartner" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->regpartner == $regpartner)? "checked" : ""); ?> <?php endif; ?>><?php echo $regpartner; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td class='b12field'><?php echo $clientprofile[13]->number_order; ?></td>
                                    <td class='b12field'><?php echo $clientprofile[13]->questions; ?></td>
                                    <?php $livingwiths = explode('|',$clientprofile[13]->answer); ?>
                                    <td class='b12field'>
                                        <?php foreach($livingwiths as $livingwith){ ?>
                                        <input type='radio' value="<?php echo $livingwith; ?>" name="livingwith"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->livingwith == $livingwith)? "checked" : ""); ?> <?php endif; ?>><?php echo $livingwith; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                           
                            </div>
                            <table class="table table-bordered b13section">
                                <tr>
                                    <th colspan='3'><strong><?php echo e(__('B 13. Information pertaining to the regular sex partner/spouse')); ?></strong></th>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>Spouse</td>
                                    <td>Partner1</td>
                                    <td>Partner2</td>
                                    <td>Partner3</td>
                                </tr>
                                <tr>
                                    <td><?php echo $infopertaining[0]->questions ?></td>
                                    <td><input type='text' style="text-transform: uppercase" name="infopertainingname1" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingname1); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                    <td><input type='text' style="text-transform: uppercase" name="infopertainingname2" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingname2); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                    <td><input type='text' style="text-transform: uppercase" name="infopertainingname3" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingname3); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                    <td><input type='text' style="text-transform: uppercase" name="infopertainingname4" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingname4); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                </tr>
                                <tr>
                                    <td><?php echo $infopertaining[1]->questions ?></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name="infopertainingage1" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingage1); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name="infopertainingage2" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingage2); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name="infopertainingage3" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingage3); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name="infopertainingage4" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->infopertainingage4); ?>' <?php endif; ?> placeholder='click or tap here to enter text'></td>
                                </tr>
                                <tr>
                                    <td><?php echo $infopertaining[2]->questions ?></td>
                                    <?php $infopgenders = explode('|',$infopertaining[2]->answer); ?>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio' value="<?php echo $infopgender; ?>" name="infopgender1" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->infopgender1 == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b13g1specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b13gender1); ?>' <?php endif; ?> name='b13gender1'>
                                        </span>
                                    </td>
                                    <?php $infopgenders = explode('|',$infopertaining[2]->answer); ?>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio' value="<?php echo $infopgender; ?>" name="infopgender2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->infopgender2 == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b13g2specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b13gender2); ?>' <?php endif; ?> name='b13gender2'>
                                        </span>
                                    </td>
                                    <?php $infopgenders = explode('|',$infopertaining[2]->answer); ?>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio' value="<?php echo $infopgender; ?>" name="infopgender3" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->infopgender3 == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b13g3specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b13gender3); ?>' <?php endif; ?> name='b13gender3'>
                                        </span>
                                    </td>
                                    <?php $infopgenders = explode('|',$infopertaining[2]->answer); ?>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio' value="<?php echo $infopgender; ?>" name="infopgender4"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->infopgender4 == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b13g4specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b13gender4); ?>' <?php endif; ?> name='b13gender4'>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td><?php echo $infopertaining[3]->questions ?></td>
                                    <?php $highriskscats = explode('|',$infopertaining[3]->answer); ?>
                                    <td>
                                        <?php foreach($highriskscats as $highriskscat){ ?>
                                            <input type='radio' value="<?php echo $highriskscat; ?>" name="highriskcat1" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->highriskcat1 == $highriskscat)? "checked" : ""); ?> <?php endif; ?>><?php echo $highriskscat; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <?php $highriskscats = explode('|',$infopertaining[3]->answer); ?>
                                    <td>
                                        <?php foreach($highriskscats as $highriskscat){ ?>
                                            <input type='radio' value="<?php echo $highriskscat; ?>" name="highriskcat2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->highriskcat2 == $highriskscat)? "checked" : ""); ?> <?php endif; ?>><?php echo $highriskscat; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <?php $highriskscats = explode('|',$infopertaining[3]->answer); ?>
                                    <td>
                                        <?php foreach($highriskscats as $highriskscat){ ?>
                                            <input type='radio' value="<?php echo $highriskscat; ?>" name="highriskcat3" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->highriskcat3 == $highriskscat)? "checked" : ""); ?> <?php endif; ?>><?php echo $highriskscat; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <?php $highriskscats = explode('|',$infopertaining[3]->answer); ?>
                                    <td>
                                        <?php foreach($highriskscats as $highriskscat){ ?>
                                            <input type='radio' value="<?php echo $highriskscat; ?>" name="highriskcat4" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->highriskcat4 == $highriskscat)? "checked" : ""); ?> <?php endif; ?>><?php echo $highriskscat; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td><?php echo $infopertaining[4]->questions ?></td>
                                    <?php $cuseilms = explode('|',$infopertaining[4]->answer); ?>
                                    <td>
                                        <?php foreach($cuseilms as $cuseilm){ ?>
                                            <input type='radio' value="<?php echo $cuseilm; ?>" name="cuilm1" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->cuilm1 == $cuseilm)? "checked" : ""); ?> <?php endif; ?>><?php echo $cuseilm; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <?php $cuseilms = explode('|',$infopertaining[4]->answer); ?>
                                    <td>
                                        <?php foreach($cuseilms as $cuseilm){ ?>
                                            <input type='radio' value="<?php echo $cuseilm; ?>" name="cuilm2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->cuilm2 == $cuseilm)? "checked" : ""); ?> <?php endif; ?>><?php echo $cuseilm; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <?php $cuseilms = explode('|',$infopertaining[4]->answer); ?>
                                    <td>
                                        <?php foreach($cuseilms as $cuseilm){ ?>
                                            <input type='radio' value="<?php echo $cuseilm; ?>" name="cuilm3" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->cuilm3 == $cuseilm)? "checked" : ""); ?> <?php endif; ?>><?php echo $cuseilm; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <?php $cuseilms = explode('|',$infopertaining[4]->answer); ?>
                                    <td>
                                        <?php foreach($cuseilms as $cuseilm){ ?>
                                            <input type='radio' value="<?php echo $cuseilm; ?>" name="cuilm4" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->cuilm4 == $cuseilm)? "checked" : ""); ?> <?php endif; ?>><?php echo $cuseilm; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                            </table>
                            
                            <table class='table table-bordered b14section'>
                                <tr>
                                    <th colspan='5'><strong><?php echo e(__('B.14: Children and their age (if applicable)')); ?></strong></th>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>Child 1</td>
                                    <td>Child 2</td>
                                    <td>Child 3</td>
                                    <td>Child 4</td>
                                </tr>
                                <tr>
                                    <td><?php echo e(__('Name')); ?></td>
                                    <td><input type='text' style="text-transform: uppercase" name='c1name' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c1name); ?>' <?php endif; ?>></td>
                                    <td><input type='text' style="text-transform: uppercase" name='c2name' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c2name); ?>' <?php endif; ?>></td>
                                    <td><input type='text' style="text-transform: uppercase" name='c3name' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c3name); ?>' <?php endif; ?>></td>
                                    <td><input type='text' style="text-transform: uppercase" name='c4name' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c4name); ?>' <?php endif; ?>></td>
                                </tr>
                                <tr>
                                    <td><?php echo e(__('Gender')); ?></td>
                                    <?php $infopgenders = explode('|',$infopertaining[2]->answer); ?>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio'  style="text-transform: uppercase" name='c1gender' value="<?php echo $infopgender; ?>" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->c1gender == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b14g1specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b14gender1); ?>' <?php endif; ?> name='b14gender1'>
                                        </span>
                                    </td>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio'  style="text-transform: uppercase" name='c2gender' value="<?php echo $infopgender; ?>" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->c2gender == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b14g2specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b14gender2); ?>' <?php endif; ?> name='b14gender2'>
                                        </span>
                                    </td>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio'  style="text-transform: uppercase" name='c3gender' value="<?php echo $infopgender; ?>" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->c3gender == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b14g3specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b14gender3); ?>' <?php endif; ?> name='b14gender3'>
                                        </span>
                                    </td>
                                    <td>
                                        <?php foreach($infopgenders as $infopgender){ ?>
                                            <input type='radio'  style="text-transform: uppercase" name='c4gender' value="<?php echo $infopgender; ?>" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->c4gender == $infopgender)? "checked" : ""); ?> <?php endif; ?>><?php echo $infopgender; ?><br>
                                            
                                        <?php } ?>
                                        <span class='b14g4specifyother' style='display:none'>
                                            <?php echo e(__('Specify Other')); ?>

                                            <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->b14gender4); ?>' <?php endif; ?> name='b14gender4'>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td><?php echo e(__('Age')); ?></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name='c1age' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c1age); ?>' <?php endif; ?>></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name='c2age' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c2age); ?>' <?php endif; ?>></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name='c3age' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c3age); ?>' <?php endif; ?>></td>
                                    <td><input type='text' maxlength="2" onkeypress=" return isNumber(event)" name='c4age' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->c4age); ?>' <?php endif; ?>></td>
                                </tr>
                            </table>
                            <table class="table table-bordered csection">
                                <tr>
                                    <th colspan='6'><strong><?php echo e(__('C. Risk profile')); ?></strong></th>
                                </tr>
                                <tr>
                                    <td colspan='3'><?php echo e(__('C1. The risk associated with unprotected sex')); ?></td>
                                    <td colspan='3'><?php echo e(__('C2. The risk associated with injecting practice')); ?></td>
                                </tr>
                                <tr>
                                    <td><?php echo $riskprofile[0]->number_order ?></td>
                                    <td><?php echo $riskprofile[0]->questions ?></td>
                                    <?php $strmoneys = explode('|',$riskprofile[0]->answer); ?>
                                    <td>
                                        <?php foreach($strmoneys as $strmoney){ ?>
                                            <input type='radio' value="<?php echo $strmoney; ?>" name="strecmoney" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->strecmoney == $strmoney)? "checked" : ""); ?> <?php endif; ?>><?php echo $strmoney; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td><?php echo $riskprofilec2[0]->number_order ?></td>
                                    <td><?php echo $riskprofilec2[0]->questions ?></td>
                                    <?php $strmoneyc2s = explode('|',$riskprofilec2[0]->answer); ?>
                                    <td>
                                        <?php foreach($strmoneyc2s as $strmoneyc2){ ?>
                                            <input type='radio' value="<?php echo $strmoneyc2; ?>" name="strmoneyc2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->strmoneyc2 == $strmoneyc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $strmoneyc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='c11a'><span class='c11a'><?php echo $riskprofile[1]->number_order ?></span></td>
                                    <td class='c11a'><span class='c11a'><?php echo $riskprofile[1]->questions ?></span></span></td>
                                    <td class='c11a'><span class='c11a'>
                                        1)<input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->hluisy); ?>' <?php endif; ?> name="hluisy">Year/s<br>
                                        2)<input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->hluism); ?>' <?php endif; ?> name="hluism">Month/s (if less than one year)<br></span>
                                    </td>
                                    <td class='c21a'><?php echo $riskprofilec2[1]->number_order ?></td>
                                    <td class='c21a'><?php echo $riskprofilec2[1]->questions ?></td>
                                    <td class='c21a'>
                                        1)<input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->hluisyc2); ?>' <?php endif; ?> name="hluisyc2">Year/s<br>
                                        2)<input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->hluismc2); ?>' <?php endif; ?> name="hluismc2">Month/s (if less than one year)<br>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='c11b'><span class='c11b'><?php echo $riskprofile[2]->number_order ?></span></td>
                                    <td class='c11b'><span class='c11b'><?php echo $riskprofile[2]->questions ?></span></td>
                                    <?php $lasttimeuhss = explode('|',$riskprofile[2]->answer); ?>
                                    <td class='c11b'><span class='c11b'>
                                        <?php foreach($lasttimeuhss as $lasttimeuhs){ ?>
                                            <input type='radio' value="<?php echo $lasttimeuhs; ?>" name="lasttuhs" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->lasttuhs == $lasttimeuhs)? "checked" : ""); ?> <?php endif; ?>><?php echo $lasttimeuhs; ?><br>
                                            
                                        <?php } ?>
                                        </span>
                                    </td>
                                    <td class='c21b'><?php echo $riskprofilec2[2]->number_order ?></td>
                                    <td class='c21b'><?php echo $riskprofilec2[2]->questions ?></td>
                                    <?php $lasttimeuhsc2s = explode('|',$riskprofilec2[2]->answer); ?>
                                    <td class='c21b'>
                                        <?php foreach($lasttimeuhsc2s as $lasttimeuhsc2){ ?>
                                            <input type='radio' value="<?php echo $lasttimeuhsc2; ?>" name="lasttimeuhsc2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->lasttimeuhsc2 == $lasttimeuhsc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $lasttimeuhsc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='c12c22'>
                                    <td class='c12'><span class='c12'><?php echo $riskprofile[3]->number_order ?></span></td>
                                    <td class='c12'><span class='c12'><?php echo $riskprofile[3]->questions ?></span></td>
                                    <td class='c12'>
                                        <span class='c12'><input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->sactuhh); ?>' <?php endif; ?> name="sactuhh" placeholder="Click or tap here to enter text."></span>
                                    </td>
                                    <td class='c22'><?php echo $riskprofilec2[3]->number_order ?></td>
                                    <td class='c22'><?php echo $riskprofilec2[3]->questions ?></td>
                                    <td class='c22'>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->sactuhhc2); ?>' <?php endif; ?> name="sactuhhc2" placeholder="Click or tap here to enter text.">
                                    </td>
                                </tr>
                                <tr class='c13c23'>
                                    <td class='c13'><span class='c13'><?php echo $riskprofile[4]->number_order ?></span></td>
                                    <td class='c13'><span class='c13'><?php echo $riskprofile[4]->questions ?></span></td>
                                    <td class='c13'><span class='c13'>
                                        <input type='text' style="text-transform: uppercase" name="sacwithoutuhh" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->sacwithoutuhh); ?>' <?php endif; ?> placeholder="Click or tap here to enter text."></span>
                                    </td>
                                    <td class='c23'><?php echo $riskprofilec2[4]->number_order ?></td>
                                    <td class='c23'><?php echo $riskprofilec2[4]->questions ?></td>
                                    <?php $frequenctneedlc2s = explode('|',$riskprofilec2[4]->answer); ?>
                                    <td class='c23'>
                                        <?php foreach($frequenctneedlc2s as $frequenctneedlc2){ ?>
                                        <input type='radio' value="<?php echo $frequenctneedlc2; ?>" name="freneedlec2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->freneedlec2 == $frequenctneedlc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $frequenctneedlc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='c1424'>
                                    <td class='c14'><span class='c14'><?php echo $riskprofile[5]->number_order ?></span></td>
                                    <td class='c14'><span class='c14'><?php echo $riskprofile[5]->questions ?></span></td>
                                    <td class='c14'><span class='c14'>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->avgnos); ?>' <?php endif; ?> name="avgnos"  placeholder="Click or tap here to enter text."></span>
                                    </td>
                                    <td class='c24'><?php echo $riskprofilec2[5]->number_order ?></td>
                                    <td class='c24'><?php echo $riskprofilec2[5]->questions ?></td>
                                    <td class='c24'>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->avgnosc2); ?>' <?php endif; ?> name="avgnosc2" placeholder="Click or tap here to enter text.">
                                    </td>
                                </tr>
                                <tr class='c15c25'>
                                    <td class='c15'><span class='c15'><?php echo $riskprofile[6]->number_order ?></span></td>
                                    <td class='c15'><span class='c15'><?php echo $riskprofile[6]->questions ?></span></td>
                                    <?php $stisymptomss = explode('|',$riskprofile[6]->answer); ?>
                                    <td class='c15'><span class='c15'>
                                        <?php foreach($stisymptomss as $stisymptoms){ ?>
                                            <input type='radio' value="<?php echo $stisymptoms; ?>" name="stisymp" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->stisymp == $stisymptoms)? "checked" : ""); ?> <?php endif; ?>><?php echo $stisymptoms; ?><br>
                                            
                                        <?php } ?>
                                        </span>
                                    </td>
                                    <td class='c25'><?php echo $riskprofilec2[6]->number_order ?></td>
                                    <td class='c25'><?php echo $riskprofilec2[6]->questions ?></td>
                                    <?php $stisymptomsc2s = explode('|',$riskprofilec2[6]->answer); ?>
                                    <td class='c25'>
                                        <?php foreach($stisymptomsc2s as $stisymptomsc2){ ?>
                                            <input type='radio' value="<?php echo $stisymptomsc2; ?>" name="stisympc2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->stisympc2 == $stisymptomsc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $stisymptomsc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='c16c26'>
                                    <td class='c16'><span class='c16'><?php echo $riskprofile[7]->number_order ?></span></td>
                                    <td class='c16'><span class='c16'><?php echo $riskprofile[7]->questions ?></span></td>
                                    <?php $aootherds = explode('|',$riskprofile[7]->answer); ?>
                                    <td class='c16'><span class='c16'>
                                        <?php foreach($aootherds as $aootherd){ ?>
                                            <input type='radio' value="<?php echo $aootherd; ?>" name="aloother" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->aloother == $aootherd)? "checked" : ""); ?> <?php endif; ?>><?php echo $aootherd; ?><br>
                                            
                                        <?php } ?>
                                        </span>
                                    </td>
                                    <td class='c26'><?php echo $riskprofilec2[7]->number_order ?></td>
                                    <td class='c26'><?php echo $riskprofilec2[7]->questions ?></td>
                                    <?php $aootherdc2s = explode('|',$riskprofilec2[7]->answer); ?>
                                    <td class='c26'>
                                        <?php foreach($aootherdc2s as $aootherdc2){ ?>
                                            <input type='radio' value="<?php echo $aootherdc2; ?>" name="alootherc2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->alootherc2 == $aootherdc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $aootherdc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='c17c27'>
                                    <td class='c17'><span class='c17'><?php echo $riskprofile[8]->number_order ?></span></td>
                                    <td class='c17'><span class='c17'><?php echo $riskprofile[8]->questions ?></span></td>
                                    <?php $throughvios = explode('|',$riskprofile[8]->answer); ?>
                                    <td class='c17'><span class='c17'>
                                        <?php foreach($throughvios as $throughvio){ ?>
                                            <input type='radio' value="<?php echo $throughvio; ?>" name="throughvio" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->throughvio == $throughvio)? "checked" : ""); ?> <?php endif; ?>><?php echo $throughvio; ?><br>
                                            
                                        <?php } ?>
                                        </span>
                                    </td>
                                    <td class='c27'><?php echo $riskprofilec2[8]->number_order ?></td>
                                    <td class='c27'><?php echo $riskprofilec2[8]->questions ?></td>
                                    <?php $throughvioc2s = explode('|',$riskprofilec2[8]->answer); ?>
                                    <td class='c27'>
                                        <?php foreach($throughvioc2s as $throughvioc2){ ?>
                                            <input type='radio' value="<?php echo $throughvioc2; ?>" name="throughvioc2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->throughvioc2 == $throughvioc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $throughvioc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='c18c28'>
                                    <td class='c18'><span class='c18'><?php echo $riskprofile[9]->number_order ?></span></td>
                                    <td class='c18'><span class='c18'><?php echo $riskprofile[9]->questions ?></span></td>
                                    <?php $mobilityaps = explode('|',$riskprofile[9]->answer); ?>
                                    <td class='c18'><span class='c18'>
                                        <?php foreach($mobilityaps as $mobilityap){ ?>
                                            <input type='radio' value="<?php echo $mobilityap; ?>" name="mobilityapo" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->mobilityapo == $mobilityap)? "checked" : ""); ?> <?php endif; ?>><?php echo $mobilityap; ?><br>
                                            
                                        <?php } ?>
                                        </span>
                                    </td>
                                    <td class='c28'><?php echo $riskprofilec2[9]->number_order ?></td>
                                    <td class='c28'><?php echo $riskprofilec2[9]->questions ?></td>
                                    <?php $mobilityapc2s = explode('|',$riskprofilec2[9]->answer); ?>
                                    <td class='c28'>
                                        <?php foreach($mobilityapc2s as $mobilityapc2){ ?>
                                            <input type='radio' value="<?php echo $mobilityapc2; ?>" name="mobilityapoc2" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->mobilityapoc2 == $mobilityapc2)? "checked" : ""); ?> <?php endif; ?>><?php echo $mobilityapc2; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='c18ac28a'>
                                    
                                    <td><span class='c18a'><?php echo $riskprofile[10]->number_order ?></span></td>
                                    <td><span class='c18a'><?php echo $riskprofile[10]->questions ?></span></td>
                                    <td><span class='c18a'>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->hmtmout); ?>' <?php endif; ?> name='hmtmout' placeholder='Click or tap here to enter text.'></span>
                                    </td>
                                    <td class='c28a'><?php echo $riskprofilec2[10]->number_order ?></td>
                                    <td class='c28a'><?php echo $riskprofilec2[10]->questions ?></td>
                                    <td class='c28a'>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->hmtmoutc2); ?>' <?php endif; ?> name='hmtmoutc2' placeholder='Click or tap here to enter text.'>
                                    </td>
                                </tr>
                            </table>
                            <table class="table table-bordered dsection">
                                <tr>
                                    <th colspan=6><strong><?php echo e(__('D. HIV test and treatment status')); ?></strong></th>
                                </tr>
                                <tr>
                                    <td><?php echo $hivtest[0]->number_order ?></td>
                                    <td><?php echo $hivtest[0]->questions ?></td>
                                    <?php $testhivs = explode('|',$hivtest[0]->answer); ?>
                                    <td>
                                        <?php foreach($testhivs as $testhiv){ ?>
                                            <input type='radio' value="<?php echo $testhiv; ?>" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->hivtest == $testhiv)? "checked" : ""); ?> <?php endif; ?> name="hivtest"><?php echo $testhiv; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td class='d2'><?php echo $hivtest[1]->number_order ?></td>
                                    <td class='d2'><?php echo $hivtest[1]->questions ?></td>
                                    <?php $tdonelss = explode('|',$hivtest[1]->answer); ?>
                                    <td class='d2'>
                                        <?php foreach($tdonelss as $tdonels){ ?>
                                            <input type='radio' value="<?php echo $tdonels; ?>" name="donelstest" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->donelstest == $tdonels)? "checked" : ""); ?> <?php endif; ?>><?php echo $tdonels; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='d3d4'>
                                    <td><?php echo $hivtest[2]->number_order ?></td>
                                    <td><?php echo $hivtest[2]->questions ?></td>
                                    <?php $testhivresults = explode('|',$hivtest[2]->answer); ?>
                                    <td>
                                        <?php foreach($testhivresults as $testhivresult){ ?>
                                            <input type='radio' value="<?php echo $testhivresult; ?>" name="hivtestresult" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->hivtestresult == $testhivresult)? "checked" : ""); ?> <?php endif; ?>><?php echo $testhivresult; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td class='d4'><?php echo $hivtest[3]->number_order ?></td>
                                    <td class='d4'><?php echo $hivtest[3]->questions ?></td>
                                    <?php $wwthetestrs = explode('|',$hivtest[3]->answer); ?>
                                    <td class='d4'>
                                        <?php foreach($wwthetestrs as $wwthetestr){ ?>
                                            <input type='radio' value="<?php echo $wwthetestr; ?>" name="wwtestr" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->wwtestr == $wwthetestr)? "checked" : ""); ?> <?php endif; ?>><?php echo $wwthetestr; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='d5d6'>
                                    <td><?php echo $hivtest[4]->number_order ?></td>
                                    <td><?php echo $hivtest[4]->questions ?></td>
                                    <?php $artcenters = explode('|',$hivtest[4]->answer); ?>
                                    <td>
                                        <?php foreach($artcenters as $artcenter){ ?>
                                            <input type='radio' value="<?php echo $artcenter; ?>" name="artcregis" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->artcregis == $artcenter)? "checked" : ""); ?> <?php endif; ?>><?php echo $artcenter; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td class='d6'><?php echo $hivtest[5]->number_order ?></td>
                                    <td class='d6'><?php echo $hivtest[5]->questions ?></td>
                                    <td class='d6'>
                                        <select name='nameartc' style="text-transform: uppercase" class='form-control'>
                                        <?php if(empty($showdata)): ?>                       <option value=''>Select Status</option>
                                        <?php endif; ?>
                                            <?php $__currentLoopData = $artnames; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $artname): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value='<?php echo e($artname->name_of_artc); ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->nameartc == $artname->name_of_artc ? 'selected' : ''); ?> <?php endif; ?>><?php echo e($artname->name_of_artc); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                        <!--<input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->nameartc); ?>' <?php endif; ?> placeholder='Click here to enter ARTC name.' name="nameartc">-->
                                    </td>
                                </tr>
                                <tr class='d7d8'>
                                    <td class='d7'><?php echo $hivtest[6]->number_order ?></td>
                                    <td class='d7'><?php echo $hivtest[6]->questions ?></td>
                                    <td class='d7'>
                                       <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->preartno); ?>' <?php endif; ?> placeholder="Click here to enter Pre-ART no" name="preartno">
                                    </td>
                                    <td class='d8'><?php echo $hivtest[7]->number_order ?></td>
                                    <td class='d8'><?php echo $hivtest[7]->questions ?></td>
                                    <td class='d8'>
                                        <div class='input-group date datetimepicker' >
                                        <input type='text' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->dateartinitiation); ?>' <?php endif; ?> class="form-control" name="dateartinitiation" placeholder="yyyy-mm-dd" />
                                        <span class="input-group-addon">
                                          <span class="glyphicon glyphicon-calendar"></span>
                                        </span>
                                        </div>
                                    </td>
                                </tr>
                                <tr class='d9d10'>
                                    <td><?php echo $hivtest[8]->number_order ?></td>
                                    <td><?php echo $hivtest[8]->questions ?></td>
                                    <td>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->artregno); ?>' <?php endif; ?> placeholder='Click here to enter ARTC name.' name="artregno">
                                    </td>
                                    <td><?php echo $hivtest[9]->number_order ?></td>
                                    <td><?php echo $hivtest[9]->questions ?></td>
                                    <?php $hutakenarts = explode('|',$hivtest[9]->answer); ?>
                                    <td>
                                        <?php foreach($hutakenarts as $hutakenart){ ?>
                                            <input type='radio' value="<?php echo $hutakenart; ?>" name="arttakenlast" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->arttakenlast == $hutakenart)? "checked" : ""); ?> <?php endif; ?>><?php echo $hutakenart; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                                <tr class='d11d12'>
                                    <td><?php echo $hivtest[10]->number_order ?></td>
                                    <td><?php echo $hivtest[10]->questions ?></td>
                                    <?php $completeviraltests = explode('|',$hivtest[10]->answer); ?>
                                    <td>
                                        <?php foreach($completeviraltests as $completeviraltest){ ?>
                                            <input type='radio'  value="<?php echo $completeviraltest; ?>" name="cviralload" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->cviralload == $completeviraltest)? "checked" : ""); ?> <?php endif; ?>><?php echo $completeviraltest; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td class='d12'><?php echo $hivtest[11]->number_order ?></td>
                                    <td class='d12'><?php echo $hivtest[11]->questions ?></td>
                                    <td class='d12'>
                                        <div class='input-group date datetimepicker' >
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->dateviraltest); ?>' <?php endif; ?> class="form-control" name="dateviraltest" placeholder="yyyy-mm-dd" />
                                        <span class="input-group-addon">
                                          <span class="glyphicon glyphicon-calendar"></span>
                                        </span>
                                        </div>
                                    </td>
                                </tr>
                                <tr class='d13d14'>
                                    <td><?php echo $hivtest[12]->number_order ?></td>
                                    <td><?php echo $hivtest[12]->questions ?></td>
                                    <?php $statusoflviraltests = explode('|',$hivtest[12]->answer); ?>
                                    <td>
                                        <?php foreach($statusoflviraltests as $statusoflviraltest){ ?>
                                            <input type='radio' value="<?php echo $statusoflviraltest; ?>" name="statusovirall" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->statusovirall == $statusoflviraltest)? "checked" : ""); ?> <?php endif; ?>><?php echo $statusoflviraltest; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td><?php echo $hivtest[13]->number_order ?></td>
                                    <td><?php echo $hivtest[13]->questions ?></td>
                                    <?php $viralloads = explode('|',$hivtest[13]->answer); ?>
                                    <td>
                                        <?php foreach($viralloads as $viralload){ ?>
                                            <input type='radio' value="<?php echo $viralload; ?>" name="viralload" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->viralload == $viralload)? "checked" : ""); ?> <?php endif; ?>><?php echo $viralload; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                            </table>
                            <table class='table table-bordered esection'>
                                <tr>
                                    <th colspan='6'><strong><?php echo e(__('E. MAT (OST) services (for PWIDs only, please skip to section G if not PWID)')); ?></strong></th>
                                </tr>
                                <tr>
                                    <td><?php echo $matostservice[0]->number_order ?></td>
                                    <td><?php echo $matostservice[0]->questions ?></td>
                                    <?php $initiatematosts = explode('|',$matostservice[0]->answer); ?>
                                    <td>
                                        <?php foreach($initiatematosts as $initiatematost){ ?>
                                            <input type='radio' value="<?php echo $initiatematost; ?>" name="ostmatini" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->ostmatini == $initiatematost)? "checked" : ""); ?> <?php endif; ?>><?php echo $initiatematost; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                    <td class='e2'><?php echo $matostservice[1]->number_order ?></td>
                                    <td class='e2'><?php echo $matostservice[1]->questions ?></td>
                                    <td class='e2'>
                                        <input type='text' style="text-transform: uppercase" <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->nameostcenter); ?>' <?php endif; ?> placeholder='Click here to enter the centre name.' name="nameostcenter">
                                    </td>
                                </tr>
                                <tr>
                                    <td class='e3'><?php echo $matostservice[2]->number_order ?></td>
                                    <td class='e3'><?php echo $matostservice[2]->questions ?></td>
                                    <?php $osttreatments = explode('|',$matostservice[2]->answer); ?>
                                    <td  class='e3' colspan='4'>
                                        <?php foreach($osttreatments as $osttreatment){ ?>
                                            <input type='radio' value="<?php echo $osttreatment; ?>" name="treatmentost" <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->treatmentost == $osttreatment)? "checked" : ""); ?> <?php endif; ?>><?php echo $osttreatment; ?><br>
                                            
                                        <?php } ?>
                                    </td>
                                </tr>
                            </table>
                            <textarea id="w3review" style="text-transform: uppercase" name="commentremark" rows="4" cols="130"  placeholder='Comments/Remarks:'><?php if(!empty($showdata)): ?><?php echo e($showdata[0]->commentremark); ?> <?php endif; ?></textarea>
                            
                            <div class="form-group">
                                <label for="state_code"><?php echo e(__('Status')); ?></label>
                                <select name='formstatus' id='staffstatus' class='form-control' required>
                                    <option value=''>Select Staff</option>
                                    <option value='pending' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->formstatus == 'pending' ? 'selected' : ''); ?> <?php endif; ?>><?php echo e(__('Pending')); ?></option>
                                    <option value='success' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->formstatus == 'success' ? 'selected' : ''); ?> <?php endif; ?>><?php echo e(__('Success')); ?></option>
                                     
                                </select>
                            </div>
                            
                            <br><br><br>
                            <button type="submit" name='regsubmit' class="btn btn-primary mr-2"><?php echo e(__('Save')); ?></button>
                            
                            <a href='<?php echo e('client-register'); ?>' class="btn btn-light"><?php echo e(__('Cancel')); ?></a>
                          </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>

    <script type="text/javascript">
        function isNumber(evt)
    	{
            evt = (evt) ? evt : window.event;
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57)) {
                return false;
            }
            return true; 
    	}
    
        $(function() {
            var default_date=  new Date();
            $('.datetimepicker').datetimepicker({  
               format: 'YYYY-MM-DD', 
                useCurrent:false, 
                maxDate: new Date(),
                defaultDate: default_date
            });
            
            $('.datetimepickerfuture').datetimepicker({  
               format: 'YYYY-MM-DD', 
                useCurrent:false, 
                minDate: default_date,
                defaultDate: default_date
            });
        });
        
        $( "#primarymobileno" ).blur(function() { 
            var mobile = $('#primarymobileno').val();
            // alert(mobile);
            $.ajax({
                type: "POST",
                url: "<?php echo e(url('checkmobile')); ?>",
                data: {mobile:mobile, _token: '<?php echo e(csrf_token()); ?>' },
                dataType: "json",
                success: function(res) { 
                    console.log(res);
                    if(res.exists == true){
                        $('#check-mobile-status').text('Mobile number already exists');
                    }else{
                        $('#check-mobile-status').text('');
                    }
                },
                error: function (jqXHR, exception) {
    
                }
            });
        });
        
         $("#numage").change(function() {
             
             var age = $('#numage').val();
             $('#check-num-age').text('');
             //alert(age);
             if(age<18)
             {
                 $('#numage').val('');
                 //$('#erorrmsg').show();
                 $('#check-num-age').text('Age Should Be Greater Than 18 or equal to 18');
             }
             
         });
        
        $(document).ready(function() {
            
            var statecode = $('#statecode').val();
            var distcode = $('#distcode').val();
           
            $.ajax({
                type: "POST",
                url: "<?php echo e(url('getserialnumber')); ?>",
                data: {statecode:statecode,distcode:distcode, _token: '<?php echo e(csrf_token()); ?>' },
                dataType: "json",
                success: function(data){
                    // console.log(data.likesnumber);
                    var sno = data.likesnumber;
                    $('#sno').text(sno);
                    $('#serialno').val(sno);
                },
                error: function (jqXHR, exception) {
    
                }
            });
            
            $('.catpri').on('change',function(){
                var catpri = $(this).val();
                if(catpri){
                    $.ajax({
                        type:'POST',
                        url:"<?php echo e(url('getsubcatdata')); ?>",
                        data:{catpri:catpri, _token: '<?php echo e(csrf_token()); ?>' },
                        success:function(response){
                            var r = response;
                            $('#b61subcat').empty();
                            $("#b61subcat").append('<option>Select</option>');
                            for (var i in r)
                            {            
                            
                                
                                $('#b61subcat').append("<option value=\""+r[i].st_description+"\">"+r[i].st_description+"</option>");
                            }
                        }
                    }); 
                }
            });
            
            $("input[name$='verbalconsent']").click(function() {
                var test = $(this).val();
                if(test == '1) Yes'){
                    $("tr.a5").hide();
                    $("tr.a5a").hide();
                    $("tr.a6").hide();
                    $(".bsection").show();
                    $("table.b13section").show();
                    $("table.b14section").show();
                    $("table.csection").show();
                    $("table.dsection").show();
                    $("table.esection").show();
                    $('#staffstatus option[value="pending"]').attr("selected",false);
                    $("#staffstatus").attr("disabled", false);
                    $("input[name$='refusal']").attr('checked', false);
                }else{
                    $("tr.a5").show();
                    $("tr.a5a").show();
                    $("tr.a6").show();
                    $('#staffstatus option[value="pending"]').attr("selected",true);
                    // $("#staffstatus").attr("disabled", true);
                }
            });
            
            $("input[name$='refusal']").click(function() {
                var test = $(this).val();
                if(test == '1) Not now, willing to participate later'){
                    $("tr.a6").show();
                    $(".bsection").hide();
                    $("table.b13section").hide();
                    $("table.b14section").hide();
                    $("table.csection").hide();
                    $("table.dsection").hide();
                    $("table.esection").hide();
                    $("tr.a5a").hide();
                    $('#staffstatus option[value="pending"]').attr("selected",true);
                    $("#staffstatus").attr("disabled", true);
                
                }else if(test == '2) Concerned about the confidentiality' || test == '3) Unwilling to get services' || test == '4) Other reason'){
                    $("tr.a6").hide();
                    $(".bsection").hide();
                    $("table.b13section").hide();
                    $("table.b14section").hide();
                    $("table.csection").hide();
                    $("table.dsection").hide();
                    $("table.esection").hide();
                    $("tr.a5a").hide();
                    $('#staffstatus option[value="pending"]').attr("selected",true);
                    $("#staffstatus").attr("disabled", true);
                }else{
                    $("tr.a6").show();
                    $("tr.a5a").hide();
                    $(".bsection").show();
                    $("table.b13section").show();
                    $("table.b14section").show();
                    $("table.csection").show();
                    $("table.dsection").show();
                    $("table.esection").show();
                    $('#staffstatus option[value="pending"]').attr("selected",false);
                    $("#staffstatus").attr("disabled", false);
                }
            });
            
            $("input[name$='gender']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b2specifyother").show();
                }else{
                    $("span.b2specifyother").hide();
                }
            });
            
            $("input[name$='enrollintarget']").click(function() {
                var test = $(this).val();
                if(test == '2) No'){
                    $("span.b71").hide();
                    
                }else{
                    $("span.b71").show();
                }
            });
            
            $("input[name$='empleestatus']").click(function() {
                var test = $(this).val();
                if(test == '8) Other'){
                    $("tr.b91").show();
                }else{
                    $("tr.b91").hide();
                }
            });
            
            $("input[name$='infopgender1']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b13g1specifyother").show();
                }else{
                    $("span.b13g1specifyother").hide();
                }
            });
            
            $("input[name$='infopgender2']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b13g2specifyother").show();
                }else{
                    $("span.b13g2specifyother").hide();
                }
            });
            
            $("input[name$='infopgender3']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b13g3specifyother").show();
                }else{
                    $("span.b13g3specifyother").hide();
                }
            });
            
            $("input[name$='infopgender4']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b13g4specifyother").show();
                }else{
                    $("span.b13g4specifyother").hide();
                }
            });
            
             $("input[name$='c1gender']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b14g1specifyother").show();
                }else{
                    $("span.b14g1specifyother").hide();
                }
            });
            
            $("input[name$='c2gender']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b14g2specifyother").show();
                }else{
                    $("span.b14g2specifyother").hide();
                }
            });
            
            $("input[name$='c3gender']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b14g3specifyother").show();
                }else{
                    $("span.b14g3specifyother").hide();
                }
            });
            
            $("input[name$='c4gender']").click(function() {
                var test = $(this).val();
                if(test == '5) Other'){
                    $("span.b14g4specifyother").show();
                }else{
                    $("span.b14g4specifyother").hide();
                }
            });
            
            
            $("input[name$='regpartner']").click(function() {
                var test = $(this).val();
                if(test == '2) No'){
                    $("td.b12field").hide();
                    $("table.b13section").hide();
                    $("table.b14section").hide();
                    
                    
                }else{
                    $("td.b12field").show();
                    $("table.b13section").show();
                    $("table.b14section").show();
                }
            });
            $("input[name$='strecmoney']").click(function() {
                var test = $(this).val();
                if(test == 'No'){
                    $("span.c11a").hide();
                    $("span.c11b").hide();
                    $("span.c12").hide();
                    $("span.c13").hide();
                    $("span.c14").hide();
                    $("span.c15").hide();
                    $("span.c16").hide();
                    $("span.c17").hide();
                    $("span.c18").hide();
                    $("span.c18a").hide();
                }else{
                    $("span.c11a").show();
                    $("span.c11b").show();
                    $("span.c12").show();
                    $("span.c13").show();
                    $("span.c14").show();
                    $("span.c15").show();
                    $("span.c16").show();
                    $("span.c17").show();
                    $("span.c18").show();
                    $("span.c18a").show();
                }
            });
            $("input[name$='strmoneyc2']").click(function() {
                var test = $(this).val();
                if(test == 'No'){
                    $("td.c21a").hide();
                    $("td.c21b").hide();
                    $("td.c22").hide();
                    $("td.c23").hide();
                    $("td.c24").hide();
                    $("td.c25").hide();
                    $("td.c26").hide();
                    $("td.c27").hide();
                    $("td.c28").hide();
                    $("td.c28a").hide();
                }else{
                    $("td.c21a").show();
                    $("td.c21b").show();
                    $("td.c22").show();
                    $("td.c23").show();
                    $("td.c24").show();
                    $("td.c25").show();
                    $("td.c26").show();
                    $("td.c27").show();
                    $("td.c28").show();
                    $("td.c28a").show();
                }
            });
            
            $("input[name$='lasttuhs']").click(function() {
                var test = $(this).val();
                // alert(test);
                if(test == 'More than 1 mth to 3 mth ago.'){
                    $("span.c12").hide();
                    $("span.c13").hide();
                    $("span.c14").hide();
                    $("span.c15").show();
                    $("span.c16").show();
                    $("span.c17").show();
                    $("span.c18").show();
                    $("span.c18a").show();
                    
                }else if(test == '3) More than 3 months to 6 months ago.' || test == '4) More than 6 months to 1 year ago.' || test == '  5) More than 1 year ago. ' ){
                   
                    $("span.c12").hide();
                    $("span.c13").hide();
                    $("span.c14").hide();
                    $("span.c15").hide();
                    $("span.c16").hide();
                    $("span.c17").hide();
                    $("span.c18").hide();
                    $("span.c18a").hide();
                    
                }
                else{
                    $("span.c12").show();
                    $("span.c13").show();
                    $("span.c14").show();
                    $("span.c15").show();
                    $("span.c16").show();
                    $("span.c17").show();
                    $("span.c18").show();
                    $("span.c18a").show();
                }
            });
            
            $("input[name$='lasttimeuhsc2']").click(function() {
                var test = $(this).val();
                if(test == 'More than 1 month to 3 months ago.'){
                    $("td.c22").hide();
                    $("td.c23").hide();
                    $("td.c24").hide();
                    $("td.c25").show();
                    $("td.c26").show();
                    $("td.c27").show();
                    $("td.c28").show();
                    $("td.c28a").show();
                    
                }else if(test == '3) More than 3 months to 6 months ago.' || test == '4) More than 6 months to 1 year ago.' || test == '5) More than 1 year ago.' ){
                    
                    $("td.c22").hide();
                    $("td.c23").hide();
                    $("td.c24").hide();
                    $("td.c25").hide();
                    $("td.c26").hide();
                    $("td.c27").hide();
                    $("td.c28").hide();
                    $("td.c28a").hide();
                }
                else{
                    $("td.c22").show();
                    $("td.c23").show();
                    $("td.c24").show();
                    $("td.c25").show();
                    $("td.c26").show();
                    $("td.c27").show();
                    $("td.c28").show();
                    $("td.c28a").show();
                }
            });
            
            $("input[name$='stisympc2']").click(function() {
                var test = $(this).val();
                if(test == 'No'){
                    $("td.c26").hide();
                    
                }else{
                    $("td.c26").show();
                }
            });
            
            $("input[name$='mobilityapo']").click(function() {
                var test = $(this).val();
                if(test == 'No'){
                    $("span.c18a").hide();
                    
                }else{
                    $("span.c18a").show();
                }
            });
            
            $("input[name$='mobilityapoc2']").click(function() {
                var test = $(this).val();
                if(test == 'No'){
                    $("td.c28a").hide();
                    
                }else{
                    $("td.c28a").show();
                }
            });
            
            $("input[name$='hivtestresult']").click(function() {
                var test = $(this).val();
                if(test == '2) No'){
                    $("td.d4").hide();
                    $("tr.d5d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }else{
                    $("td.d4").show();
                    $("tr.d5d6").show();
                    $("tr.d7d8").show();
                    $("tr.d9d10").show();
                    $("tr.d11d12").show();
                    $("tr.d13d14").show();
                }
            });
            $("input[name$='wwtestr']").click(function() {
                var test = $(this).val();
                if(test == '2) Negative'){
                    $("tr.d5d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }else{
                    $("tr.d5d6").show();
                    $("tr.d7d8").show();
                    $("tr.d9d10").show();
                    $("tr.d11d12").show();
                    $("tr.d13d14").show();
                }
            });
            $("input[name$='artcregis']").click(function() {
                var test = $(this).val();
                if(test == '2) No'){
                    $("td.d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }else if(test == '3)Registered but not initiated ART'){
                    $("td.d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    $("td.d6").show();
                    $("td.d7").show();
                }
                else{
                    $("td.d6").show();
                    $("td.d8").show();
                    $("tr.d7d8").show();
                    $("tr.d9d10").show();
                    $("tr.d11d12").show();
                    $("tr.d13d14").show();
                }
                
            });
            $("input[name$='cviralload']").click(function() {
                var test = $(this).val();
                if(test == '2) No' || test == "3) Don't know"){
                    $("td.d12").hide();
                    $("tr.d13d14").hide();
                    
                }else{
                    $("td.d12").show();
                    $("tr.d13d14").show();
                }
            });
            
            $("input[name$='ostmatini']").click(function() {
                var test = $(this).val();
                if(test == '2) No'){
                    $("td.e2").hide();
                    $("td.e3").hide();
                    
                }else{
                    $("td.e2").show();
                    $("td.e3").show();
                }
            });
            
            $("input[name$='hivtest']").click(function() {
                var test = $(this).val();
                if(test == '2) No' || test == "3) Don't know"){
                    $("td.d2").hide();
                    $("tr.d3d4").hide();
                    $("tr.d5d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }else{
                    $("td.d2").show();
                    $("tr.d3d4").show();
                    $("tr.d5d6").show();
                    $("tr.d7d8").show();
                    $("tr.d9d10").show();
                    $("tr.d11d12").show();
                    $("tr.d13d14").show();
                }
            });
        });
        
        $(window).load(function(){
            
            var test1 = $("input[name$='verbalconsent']:checked").val();
                if(test1 == '1) Yes'){
                    $("tr.a5").hide();
                    $("tr.a5a").hide();
                    $("tr.a6").hide();
                }
                
            var test2 = $("input[name$='refusal']:checked").val();
                if(test2 == '1) Not now, willing to participate later'){
                    $("tr.a6").show();
                    $(".bsection").hide();
                    $("table.b13section").hide();
                    $("table.b14section").hide();
                    $("table.csection").hide();
                    $("table.dsection").hide();
                    $("table.esection").hide();
                    $("tr.a5a").hide();
                
                }else if(test2 == '2) Concerned about the confidentiality' || test2 == '3) Unwilling to get services' || test2 == '4) Other reason'){
                    $("tr.a6").hide();
                    $(".bsection").hide();
                    $("table.b13section").hide();
                    $("table.b14section").hide();
                    $("table.csection").hide();
                    $("table.dsection").hide();
                    $("table.esection").hide();
                    $("tr.a5a").hide();
                }
            
            var test3 = $("input[name$='enrollintarget']:checked").val();
                if(test3 == '2) No'){
                    $("span.b71").hide();
                    
                }
            
            var test4 = $("input[name$='regpartner']:checked").val();
                if(test4 == '2) No'){
                    $("td.b12field").hide();
                    $("table.b13section").hide();
                    $("table.b14section").hide();
                    
                    
                }
            
            var test5 = $("input[name$='strecmoney']:checked").val();
            
                if(test5 == 'No'){
                    $("span.c11a").hide();
                    $("span.c11b").hide();
                    $("span.c12").hide();
                    $("span.c13").hide();
                    $("span.c14").hide();
                    $("span.c15").hide();
                    $("span.c16").hide();
                    $("span.c17").hide();
                    $("span.c18").hide();
                    $("span.c18a").hide();
                }
            
            var test6 = $("input[name$='strmoneyc2']:checked").val();
                if(test6 == 'No'){
                    $("td.c21a").hide();
                    $("td.c21b").hide();
                    $("td.c22").hide();
                    $("td.c23").hide();
                    $("td.c24").hide();
                    $("td.c25").hide();
                    $("td.c26").hide();
                    $("td.c27").hide();
                    $("td.c28").hide();
                    $("td.c28a").hide();
                }
            
            var test7 = $("input[name$='lasttuhs']:checked").val();
                if(test7 == 'More than 1 mth to 3 mth ago.'){
                    $("span.c12").hide();
                    $("span.c13").hide();
                    $("span.c14").hide();
                    $("span.c15").show();
                    $("span.c16").show();
                    $("span.c17").show();
                    $("span.c18").show();
                    $("span.c18a").show();
                    
                }else if(test7 == '3) More than 3 months to 6 months ago.' || test7 == '4) More than 6 months to 1 year ago.' || test7 == '  5) More than 1 year ago. ' ){
                   
                    $("td.c12").hide();
                    $("td.c13").hide();
                    $("td.c14").hide();
                    $("td.c15").hide();
                    $("td.c16").hide();
                    $("td.c17").hide();
                    $("td.c18").hide();
                    $("td.c18a").hide();
                    
                }
                
            var test8 = $("input[name$='lasttimeuhsc2']:checked").val();
                if(test8 == 'More than 1 month to 3 months ago.'){
                    $("td.c22").hide();
                    $("td.c23").hide();
                    $("td.c24").hide();
                    $("td.c25").show();
                    $("td.c26").show();
                    $("td.c27").show();
                    $("td.c28").show();
                    $("td.c28a").show();
                    
                }else if(test8 == '3) More than 3 months to 6 months ago.' || test8 == '4) More than 6 months to 1 year ago.' || test8 == '5) More than 1 year ago.' ){
                    
                    $("td.c22").hide();
                    $("td.c23").hide();
                    $("td.c24").hide();
                    $("td.c25").hide();
                    $("td.c26").hide();
                    $("td.c27").hide();
                    $("td.c28").hide();
                    $("td.c28a").hide();
                }
                
            var test9 = $("input[name$='stisympc2']:checked").val();
                if(test9 == 'No'){
                    $("td.c26").hide();
                    
                }
            
            var test10 = $("input[name$='mobilityapo']:checked").val();
                if(test10 == 'No'){
                    $("td.c18a").hide();
                    
                }
            
            var test11 = $("input[name$='mobilityapoc2']:checked").val();
                if(test11 == 'No'){
                    $("td.c28a").hide();
                    
                }
            
            var test12 = $("input[name$='hivtestresult']:checked").val();
                if(test12 == '2) No'){
                    $("td.d4").hide();
                    $("tr.d5d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }
            
            var test13 = $("input[name$='wwtestr']:checked").val();
                if(test13 == '2) Negative'){
                    $("tr.d5d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }
            
            var test14 = $("input[name$='artcregis']:checked").val();
                if(test14 == '2) No'){
                    $("td.d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }else if(test14 == '3)Registered but not initiated ART'){
                    $("td.d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    $("td.d6").show();
                    $("td.d7").show();
                }
            
            var test15 = $("input[name$='cviralload']:checked").val();
                if(test15 == '2) No' || test15 == "3) Don't know"){
                    $("td.d12").hide();
                    $("tr.d13d14").hide();
                    
                }
            
            var test16 = $("input[name$='ostmatini']:checked").val();
                if(test16 == '2) No'){
                    $("td.e2").hide();
                    $("td.e3").hide();
                    
                }
            
            var test17 = $("input[name$='hivtest']:checked").val();
                if(test17 == '2) No' || test17 == "3) Don't know"){
                    $("td.d2").hide();
                    $("tr.d3d4").hide();
                    $("tr.d5d6").hide();
                    $("tr.d7d8").hide();
                    $("tr.d9d10").hide();
                    $("tr.d11d12").hide();
                    $("tr.d13d14").hide();
                    
                }
                
            var test18 = $("input[name$='gender']:checked").val();
                if(test18 == '5) Other'){
                     $("span.b2specifyother").show();
                }
            var test19 = $("input[name$='empleestatus']:checked").val();
                if(test19 == '8) Other'){
                     $("tr.b91").show();
                }
                
            var test20 = $("input[name$='infopgender1']:checked").val();
                if(test20 == '5) Other'){
                     $("span.b13g1specifyother").show();
                }
            var test21 = $("input[name$='infopgender2']:checked").val();
                if(test21 == '5) Other'){
                     $("span.b13g2specifyother").show();
                }
            var test22 = $("input[name$='infopgender3']:checked").val();
                if(test22 == '5) Other'){
                     $("span.b13g3specifyother").show();
                }
            var test23 = $("input[name$='infopgender4']:checked").val();
                if(test23 == '5) Other'){
                    $("span.b13g4specifyother").show();
                }
            
            var test24 = $("input[name$='c1gender']:checked").val();
                if(test24 == '5) Other'){
                     $("span.b14g1specifyother").show();
                }
            var test25 = $("input[name$='c2gender']:checked").val();
                if(test25 == '5) Other'){
                     $("span.b14g2specifyother").show();
                }
            var test26 = $("input[name$='c3gender']:checked").val();
                if(test26 == '5) Other'){
                     $("span.b14g3specifyother").show();
                }
            var test27 = $("input[name$='c4gender']:checked").val();
                if(test27 == '5) Other'){
                    $("span.b14g4specifyother").show();
                }
                
        });
        
        
    </script> 
    
    <!-- push external js -->
    <?php $__env->startPush('script'); ?>
        <script src="<?php echo e(asset('js/form-components.js')); ?>"></script>
    <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/viruxyz/public_html/ejaf/resources/views/pages/client-register-2.blade.php ENDPATH**/ ?>