@extends('layout.master')

@section('title', 'Add')

@section('content')

    <section>
        <div class="row">
            <div class="col-12">

                <div class="card">

                    <div class="card-content">
                        <div class="card-header">
                             <h1>Add</h1>

                        </div>
                        <div class="card-body card-dashboard">
                            @include('inc.messages')
                            <form class="form" method="POST" action="{{route('member.store')}}" enctype="multipart/form-data">
                                @csrf
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="full_name">Full Name*</label>
                                                <input type="text" id="full_name" class="form-control"
                                                    placeholder="Full Name" value="{{old('name')}}" name="name" required>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="full_name">Guardian Name*</label>
                                                <div class="row">
                                                    <div class="col-2" style=" padding-right: 0;">
                                                        <select name="initial" id=""  class="form-control" required>
                                                            <option value="S/O">S/O</option>
                                                            <option value="D/O">D/O</option>
                                                            <option value="W/O">W/O</option>
                                                        </select>
                                                    </div>
                                                    <div class="col-10"  style=" padding-left: 0;">
                                                        <input type="text" id="parent_name" class="form-control"
                                                            placeholder="Guardian Name" value="{{old('parent_name')}}" name="parent_name" required>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="member_number">Member OM#</label>
                                                <input type="text" id="member_number" class="form-control"
    placeholder="Member #" value="{{$member_number}}" name="member_number" 
    required readonly style="background-color: #f5f5f5; cursor: not-allowed;">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="gender">Gender*</label>
                                                <select name="gender" id="gender" class="form-control" required>
                                                    @if (old('gender')==0)
                                                    <option value="0" selected>Male</option>
                                                    <option value="1">Female</option>
                                                    @elseif(old('gender')==1)
                                                    <option value="0">Male</option>
                                                    <option value="1" selected>Female</option>
                                                    @else
                                                    <option value="">Select</option>
                                                    <option value="0">Male</option>
                                                    <option value="1">Female</option>
                                                    @endif
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6" >
                                            <div class="form-group">
                                                <label for="add_father">Reference FO</label>
                                                <select name="add_father" id="add_father" class="select2 form-control">
                                                    @foreach($fathers as $father)
                                                        <option value="{{$father->id}}">{{$father->name}} ({{$father->member_number}})</option>
                                                    @endforeach
                                                </select>

                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="dob">Date of Birth*</label>
                                                <input type="date" id="dob" class="form-control"
                                                    placeholder="DOB" name="dob"  value="{{old('dob')}}" required>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="minor" style="display: inline-flex;">Minor</label>
                                                <input type="checkbox" name="minor" id="minor" class="form-control" placeholder="Minor">
                                            </div>
                                        </div>
                                        <div class="col-md-6" id="cnic_input">
                                            <div class="form-group">
                                                <label for="cnic">CNIC*</label>
                                                <input type="text" id="cnic" class="form-control"
                                                    placeholder="CNIC" name="cnic"  value="{{old('cnic')}}" required>
                                            </div>
                                        </div>



                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="phone">Mobile Number*</label>
                                                <input type="text" id="mobile_number"  class="form-control"
                                                    placeholder="Mobile Phone" name="mobile_number" value="{{old('mobile_number')}}" required>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="phone">Contact Number*</label>
                                                <input type="text" id="phone"  class="form-control"
                                                    placeholder="Phone" name="phone" value="{{old('phone')}}" required>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="email">E-mail</label>
                                        <input type="email" id="email" class="form-control"
                                            placeholder="E-mail" name="email"  value="{{old('email')}}" >
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="picture">Picture*</label>
                                                <input type="file" id="picture" class="form-control"
                                                    placeholder="Picture" name="picture" required>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="pdf_doc">Document CNIC/B-form</label>
                                                <input type="file" id="pdf_doc" class="form-control"
                                                    placeholder="Document" name="pdf_doc" >
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="maritial_status">Maritial Status*</label>
                                                <select name="maritial_status" id="maritial_status" class="form-control" required onchange="married_show(this)">
                                                        <option value="" seleted>Select</option>
                                                        <option value="0">Married</option>
                                                        <option value="1">Unmarried</option>
                                                        <option value="2">Widow</option>
                                                        <option value="3">Widower</option>
                                                        <option value="4">Divorcee</option>
                                                        
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6" id="married_where_div" style="display:none">
                                            <div class="form-group">
                                                <label for="Married Where">Married Where*</label>
                                                <select name="married_where" class="form-control" id="married_where">
                                                <option value="">-Select-</option>
                                                <option value="With-In Community">With-In Community</option>
                                                <option value="Outside Community">Outside Community</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6 d-none" id="add_huband_div">
                                            <div class="form-group">
                                                <label for="add_husband">Reference HO</label>
                                                <select name="add_husband" id="add_husband" class="select2 form-control">
                                                    @foreach($husbands as $husband)
                                                        <option value="{{$husband->id}}">{{$husband->name}} ({{$husband->member_number}})</option>
                                                    @endforeach
                                                </select>

                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="religion">Religion*</label>
                                                <select name="religion" id="religion" class="form-control" required>
                                                    @if (old('religion')=='Islam')
                                                    <option value="Islam" selected>Islam</option>
                                                    <option value="Christianity">Christianity</option>
                                                    <option value="Hinduism">Hinduism</option>
                                                @elseif(old('religion')=='Christianity')
                                                    <option value="Islam" >Islam</option>
                                                    <option value="Christianity" selected>Christianity</option>
                                                    <option value="Hinduism">Hinduism</option>
                                                @elseif(old('religion')== 'Hinduism')
                                                    <option value="Islam" >Islam</option>
                                                    <option value="Christianity">Christianity</option>
                                                    <option value="Hinduism" selected>Hinduism</option>
                                                @else
                                                    <option value="Islam" selected>Islam</option>
                                                    <option value="Christianity">Christianity</option>
                                                    <option value="Hinduism">Hinduism</option>
                                                @endif
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="nationality">Nationality*</label>
                                                <select name="nationality" id="nationality" class="form-control" required>
                                                    @if (old('nationality')=='Pakistani')
                                                    <option value="Pakistani" selected>Pakistani</option>
                                                    <option value="Foreigner">Foreigner</option>
                                                    <option value="Dual Nationality">Dual Nationality</option>
                                                @elseif(old('nationality')=='Foreigner')
                                                    <option value="Pakistani" >Pakistani</option>
                                                    <option value="Foreigner" selected>Foreigner</option>
                                                    <option value="Dual Nationality">Dual Nationality</option>
                                                @elseif(old('nationality')=='Dual Nationality')
                                                    <option value="Pakistani" >Pakistani</option>
                                                    <option value="Foreigner" >Foreigner</option>
                                                    <option value="Dual Nationality" selected>Dual Nationality</option>

                                                @else
                                                    <option value="">Select</option>
                                                    <option value="Pakistani">Pakistani</option>
                                                    <option value="Foreigner">Foreigner</option>
                                                    <option value="Dual Nationality" selected>Dual Nationality</option>
                                                @endif
                                                </select>
                                                {{-- <input type="text" id="nationality" class="form-control"
                                                    placeholder="Nationality" name="nationality" value="{{old('nationality')}}" required> --}}
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="blood_group">Blood Group</label>
                                                <select name="blood_group" id="blood_group" class="form-control" >
                                                    @if (old('blood_group')=='A +ve')
                                                        <option value="A +ve" selected>A +ve</option>
                                                        <option value="A -ve">A -ve</option>
                                                        <option value="B +ve">B +ve</option>
                                                        <option value="B -ve">B -ve</option>
                                                        <option value="AB +ve">AB +ve</option>
                                                        <option value="AB -ve">AB -ve</option>
                                                        <option value="O +ve">O +ve</option>
                                                        <option value="O -ve">O -ve</option>

                                                        @elseif(old('blood_group')=='A -ve')
                                                            <option value="A +ve">A +ve</option>
                                                            <option value="A -ve" selected>A -ve</option>
                                                            <option value="B +ve">B +ve</option>
                                                            <option value="B -ve">B -ve</option>
                                                            <option value="AB +ve">AB +ve</option>
                                                            <option value="AB -ve">AB -ve</option>
                                                            <option value="O +ve">O +ve</option>
                                                            <option value="O -ve">O -ve</option>

                                                        @elseif(old('blood_group')=='B +ve')
                                                            <option value="A +ve">A +ve</option>
                                                            <option value="A -ve">A -ve</option>
                                                            <option value="B +ve" selected>B +ve</option>
                                                            <option value="B -ve">B -ve</option>
                                                            <option value="AB +ve">AB +ve</option>
                                                            <option value="AB -ve">AB -ve</option>
                                                            <option value="O +ve">O +ve</option>
                                                            <option value="O -ve">O -ve</option>
                                                    @elseif(old('blood_group')=='B -ve')
                                                        <option value="A +ve">A +ve</option>
                                                        <option value="A -ve" >A -ve</option>
                                                        <option value="B +ve">B +ve</option>
                                                        <option value="B -ve" selected>B -ve</option>
                                                        <option value="AB +ve">AB +ve</option>
                                                        <option value="AB -ve">AB -ve</option>
                                                        <option value="O +ve">O +ve</option>
                                                        <option value="O -ve">O -ve</option>




                                                        @elseif(old('blood_group')=='AB +ve')
                                                        <option value="A +ve">A +ve</option>
                                                        <option value="A -ve" >A -ve</option>
                                                        <option value="B +ve">B +ve</option>
                                                        <option value="B -ve">B -ve</option>
                                                        <option value="AB +ve" selected>AB +ve</option>
                                                        <option value="AB -ve">AB -ve</option>
                                                        <option value="O +ve">O +ve</option>
                                                        <option value="O -ve">O -ve</option>




                                                        @elseif(old('blood_group')=='AB -ve')
                                                        <option value="A +ve">A +ve</option>
                                                        <option value="A -ve" >A -ve</option>
                                                        <option value="B +ve">B +ve</option>
                                                        <option value="B -ve">B -ve</option>
                                                        <option value="AB +ve">AB +ve</option>
                                                        <option value="AB -ve" selected>AB -ve</option>
                                                        <option value="O +ve">O +ve</option>
                                                        <option value="O -ve">O -ve</option>

                                                        @elseif(old('blood_group')=='O +ve')
                                                        <option value="A +ve">A +ve</option>
                                                        <option value="A -ve" >A -ve</option>
                                                        <option value="B +ve">B +ve</option>
                                                        <option value="B -ve">B -ve</option>
                                                        <option value="AB +ve">AB +ve</option>
                                                        <option value="AB -ve">AB -ve</option>
                                                        <option value="O +ve" selected>O +ve</option>
                                                        <option value="O -ve">O -ve</option>

                                                        @elseif(old('blood_group')=='0 -ve')
                                                        <option value="A +ve">A +ve</option>
                                                        <option value="A -ve" selected>A -ve</option>
                                                        <option value="B +ve">B +ve</option>
                                                        <option value="B -ve">B -ve</option>
                                                        <option value="AB +ve">AB +ve</option>
                                                        <option value="AB -ve">AB -ve</option>
                                                        <option value="O +ve">O +ve</option>
                                                        <option value="O -ve" selected>O -ve</option>

                                                    @else
                                                    <option value="">Select</option>
                                                    <option value="A +ve">A +ve</option>
                                                    <option value="A -ve">A -ve</option>
                                                    <option value="B +ve">B +ve</option>
                                                    <option value="B -ve">B -ve</option>
                                                    <option value="AB +ve">AB +ve</option>
                                                    <option value="AB -ve">AB -ve</option>
                                                    <option value="O +ve">O +ve</option>
                                                    <option value="O -ve">O -ve</option>
                                                @endif

                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="qualification">Qualification*</label>
                                                <select name="qualification" id="qualification" class="form-control" required>
                                                @if (old('qualification')=='No formal education')
                                                    <option value="No formal education" selected>No formal education</option>
                                                    <option value="Primary education">Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                @elseif(old('qualification')=='Primary education')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" selected>Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">B.COM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='Matric')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric" selected>Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">B.COM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='Intermediate')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate" selected>Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">B.COM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='O Level')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level" selected>O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">B.COM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='A Level')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level" selected>A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">B.COM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='Bachelors degree')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree" selected>Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='BCOM')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree" >Bachelors degree</option>
                                                    <option value="BCOM" selected>BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='B-ED')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree" >Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED" selected>B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='Masters degree')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree" >Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree" selected>Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                    @elseif(old('qualification')=='Doctorate or higher')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree" >Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher" selected>Doctorate or higher</option>
                                                    <option value="Others">Others</option>
                                                    @elseif(old('qualification')=='Others')
                                                    <option value="No formal education" >No formal education</option>
                                                    <option value="Primary education" >Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree" >Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher" >Doctorate or higher</option>
                                                    <option value="Others" selected>Others</option>


                                                @else
                                                    <option value="">Select</option>
                                                    <option value="No formal education">No formal education</option>
                                                    <option value="Primary education">Primary education</option>
                                                    <option value="Matric">Matric</option>
                                                    <option value="Intermediate">Intermediate</option>
                                                    <option value="O Level">O Level</option>
                                                    <option value="A Level">A Level</option>
                                                    <option value="Bachelors degree">Bachelors degree</option>
                                                    <option value="BCOM">BCOM</option>
                                                    <option value="B-ED">B-ED</option>
                                                    <option value="Masters degree">Masters degree</option>
                                                    <option value="Doctorate or higher">Doctorate or higher</option>
                                                    <option value="Others">Others</option>

                                                @endif
                                                </select>
                                                {{-- <input type="text" id="qualification" class="form-control"
                                                    placeholder="Qualification" value="{{old('qualification')}}" name="qualification" required> --}}
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="profession">Profession</label>
                                                <select name="profession" id="profession" class="form-control">
                                                        <option value="">Select</option>
                                                        <option value="Doctor" >Doctor</option>
                                                        <option value="Engineer" >Engineer</option>
                                                        <option value="Govt Servant" >Govt Servant</option>
                                                        <option value="Banker" >Banker</option>
                                                        <option value="Business Man" >Business Man</option>
                                                        <option value="Teacher" >Teacher</option>
                                                        <option value="Others">Others</option>
                                                    </select>
                                                {{-- <input type="text" id="profession" class="form-control"
                                                    placeholder="Profession"  value="{{old('profession')}}" name="profession" required> --}}
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="income">Income</label>
                                                <select name="income" id="income" class="form-control">
                                                    @if (old('income')=='10000 - 30000')
                                                        <option value="10000 - 30000" selected>10000 - 30000</option>
                                                        <option value="31000 - 45000">31000 - 45000</option>
                                                        <option value="46000 - 80000">46000 - 80000</option>
                                                        <option value="81000 - 100000">81000 - 100000</option>
                                                        <option value="101000 - 200000">101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>
                                                    @elseif(old('income')=='46000 - 80000')
                                                         <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000">31000 - 45000</option>
                                                        <option value="46000 - 80000" selected>46000 - 80000</option>
                                                        <option value="81000 - 100000">81000 - 100000</option>
                                                        <option value="101000 - 200000">101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>

                                                        @elseif(old('income')=='46000 - 80000')
                                                       <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" selected>46000 - 80000</option>
                                                        <option value="81000 - 100000">81000 - 100000</option>
                                                        <option value="101000 - 200000">101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>

                                                        @elseif(old('income')=='81000 - 100000')
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" selected>81000 - 100000</option>
                                                        <option value="101000 - 200000">101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>

                                                        @elseif(old('income')=='101000 - 200000')
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" >81000 - 100000</option>
                                                        <option value="101000 - 200000" selected>101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>

                                                         @elseif(old('income')=='201000 - 400000')
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" >81000 - 100000</option>
                                                        <option value="101000 - 200000" >101000 - 200000</option>
                                                        <option value="201000 - 400000" selected>201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>

                                                         @elseif(old('income')=='401000 - 500000')
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" >81000 - 100000</option>
                                                        <option value="101000 - 200000" >101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000" selected>401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>

                                                         @elseif(old('income')=='above 500000 ')
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" >81000 - 100000</option>
                                                        <option value="101000 - 200000" >101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000" selected>above 500000 </option>
                                                        <option value="Others">Others</option>
                                                        @elseif(old('income')=='Others')
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" >81000 - 100000</option>
                                                        <option value="101000 - 200000" >101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000" >above 500000 </option>
                                                        <option value="Others" selected>Others</option>


                                                    @else
                                                        <option value="">Select</option>
                                                        <option value="10000 - 30000" >10000 - 30000</option>
                                                        <option value="31000 - 45000" >31000 - 45000</option>
                                                        <option value="46000 - 80000" >46000 - 80000</option>
                                                        <option value="81000 - 100000" >81000 - 100000</option>
                                                        <option value="101000 - 200000" >101000 - 200000</option>
                                                        <option value="201000 - 400000">201000 - 400000</option>
                                                        <option value="401000 - 500000">401000 - 500000</option>
                                                        <option value="above 500000">above 500000 </option>
                                                        <option value="Others">Others</option>


                                                    @endif
                                                    </select>
                                                {{-- <input type="text" id="income" class="form-control"
                                                    placeholder="Income" name="income"  value="{{old('income')}}" required> --}}
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="district">District*</label>
                                                <select name="district" id="district" class="form-control" required>
                                                    @if (old('district')=='Central')
                                                        <option value="Central" selected>Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South">South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi">Korangi</option>
                                                        <option value="Malir">Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                    @elseif(old('district')=='East')
                                                        <option value="Central" >Central</option>
                                                        <option value="East" selected>East</option>
                                                        <option value="South">South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi">Korangi</option>
                                                        <option value="Malir">Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                        @elseif(old('district')=='South')
                                                        <option value="Central" >Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South" selected>South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi">Korangi</option>
                                                        <option value="Malir">Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                        @elseif(old('district')=='West')
                                                        <option value="Central" >Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South" >South</option>
                                                        <option value="West" selected>West</option>
                                                        <option value="Korangi">Korangi</option>
                                                        <option value="Malir">Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                        @elseif(old('district')=='Korangi')
                                                        <option value="Central" >Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South" >South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi" selected>Korangi</option>
                                                        <option value="Malir">Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                        @elseif(old('district')=='Malir')
                                                        <option value="Central" >Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South" >South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi" >Korangi</option>
                                                        <option value="Malir" selected>Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                        @elseif(old('district')=='Keamari')
                                                        <option value="Central" >Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South" >South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi" >Korangi</option>
                                                        <option value="Malir" >Malir</option>
                                                        <option value="Keamari" selected>Keamari</option>

                                                    @else
                                                        <option value="">Select</option>
                                                        <option value="Central" >Central</option>
                                                        <option value="East">East</option>
                                                        <option value="South" >South</option>
                                                        <option value="West">West</option>
                                                        <option value="Korangi" >Korangi</option>
                                                        <option value="Malir" >Malir</option>
                                                        <option value="Keamari">Keamari</option>
                                                    @endif
                                                    </select>
                                                {{-- <input type="text" id="district" class="form-control"
                                                    placeholder="District" name="district"  value="{{old('district')}}" required> --}}
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="village">Village From India*</label>
                                                <input type="text" id="village" class="form-control"
                                                    placeholder="Village" name="village" value="{{old('village')}}" required>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="city">City*</label>
                                                <select id="city" name="city" class="form-control" required>
                                                    <option value="">-Select-</option>

                                                   @foreach ($cities as $city)
                                                    <option value="{{$city->name}}">{{$city->name}}</option>

                                                   @endforeach
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="city">Country*</label>
                                                <select id="country" name="country" class="form-control">
                                                    <option value="Afganistan">Afghanistan</option>
                                                    <option value="Albania">Albania</option>
                                                    <option value="Algeria">Algeria</option>
                                                    <option value="American Samoa">American Samoa</option>
                                                    <option value="Andorra">Andorra</option>
                                                    <option value="Angola">Angola</option>
                                                    <option value="Anguilla">Anguilla</option>
                                                    <option value="Antigua & Barbuda">Antigua & Barbuda</option>
                                                    <option value="Argentina">Argentina</option>
                                                    <option value="Armenia">Armenia</option>
                                                    <option value="Aruba">Aruba</option>
                                                    <option value="Australia">Australia</option>
                                                    <option value="Austria">Austria</option>
                                                    <option value="Azerbaijan">Azerbaijan</option>
                                                    <option value="Bahamas">Bahamas</option>
                                                    <option value="Bahrain">Bahrain</option>
                                                    <option value="Bangladesh">Bangladesh</option>
                                                    <option value="Barbados">Barbados</option>
                                                    <option value="Belarus">Belarus</option>
                                                    <option value="Belgium">Belgium</option>
                                                    <option value="Belize">Belize</option>
                                                    <option value="Benin">Benin</option>
                                                    <option value="Bermuda">Bermuda</option>
                                                    <option value="Bhutan">Bhutan</option>
                                                    <option value="Bolivia">Bolivia</option>
                                                    <option value="Bonaire">Bonaire</option>
                                                    <option value="Bosnia & Herzegovina">Bosnia & Herzegovina</option>
                                                    <option value="Botswana">Botswana</option>
                                                    <option value="Brazil">Brazil</option>
                                                    <option value="British Indian Ocean Ter">British Indian Ocean Ter</option>
                                                    <option value="Brunei">Brunei</option>
                                                    <option value="Bulgaria">Bulgaria</option>
                                                    <option value="Burkina Faso">Burkina Faso</option>
                                                    <option value="Burundi">Burundi</option>
                                                    <option value="Cambodia">Cambodia</option>
                                                    <option value="Cameroon">Cameroon</option>
                                                    <option value="Canada">Canada</option>
                                                    <option value="Canary Islands">Canary Islands</option>
                                                    <option value="Cape Verde">Cape Verde</option>
                                                    <option value="Cayman Islands">Cayman Islands</option>
                                                    <option value="Central African Republic">Central African Republic</option>
                                                    <option value="Chad">Chad</option>
                                                    <option value="Channel Islands">Channel Islands</option>
                                                    <option value="Chile">Chile</option>
                                                    <option value="China">China</option>
                                                    <option value="Christmas Island">Christmas Island</option>
                                                    <option value="Cocos Island">Cocos Island</option>
                                                    <option value="Colombia">Colombia</option>
                                                    <option value="Comoros">Comoros</option>
                                                    <option value="Congo">Congo</option>
                                                    <option value="Cook Islands">Cook Islands</option>
                                                    <option value="Costa Rica">Costa Rica</option>
                                                    <option value="Cote DIvoire">Cote DIvoire</option>
                                                    <option value="Croatia">Croatia</option>
                                                    <option value="Cuba">Cuba</option>
                                                    <option value="Curaco">Curacao</option>
                                                    <option value="Cyprus">Cyprus</option>
                                                    <option value="Czech Republic">Czech Republic</option>
                                                    <option value="Denmark">Denmark</option>
                                                    <option value="Djibouti">Djibouti</option>
                                                    <option value="Dominica">Dominica</option>
                                                    <option value="Dominican Republic">Dominican Republic</option>
                                                    <option value="East Timor">East Timor</option>
                                                    <option value="Ecuador">Ecuador</option>
                                                    <option value="Egypt">Egypt</option>
                                                    <option value="El Salvador">El Salvador</option>
                                                    <option value="Equatorial Guinea">Equatorial Guinea</option>
                                                    <option value="Eritrea">Eritrea</option>
                                                    <option value="Estonia">Estonia</option>
                                                    <option value="Ethiopia">Ethiopia</option>
                                                    <option value="Falkland Islands">Falkland Islands</option>
                                                    <option value="Faroe Islands">Faroe Islands</option>
                                                    <option value="Fiji">Fiji</option>
                                                    <option value="Finland">Finland</option>
                                                    <option value="France">France</option>
                                                    <option value="French Guiana">French Guiana</option>
                                                    <option value="French Polynesia">French Polynesia</option>
                                                    <option value="French Southern Ter">French Southern Ter</option>
                                                    <option value="Gabon">Gabon</option>
                                                    <option value="Gambia">Gambia</option>
                                                    <option value="Georgia">Georgia</option>
                                                    <option value="Germany">Germany</option>
                                                    <option value="Ghana">Ghana</option>
                                                    <option value="Gibraltar">Gibraltar</option>
                                                    <option value="Great Britain">Great Britain</option>
                                                    <option value="Greece">Greece</option>
                                                    <option value="Greenland">Greenland</option>
                                                    <option value="Grenada">Grenada</option>
                                                    <option value="Guadeloupe">Guadeloupe</option>
                                                    <option value="Guam">Guam</option>
                                                    <option value="Guatemala">Guatemala</option>
                                                    <option value="Guinea">Guinea</option>
                                                    <option value="Guyana">Guyana</option>
                                                    <option value="Haiti">Haiti</option>
                                                    <option value="Hawaii">Hawaii</option>
                                                    <option value="Honduras">Honduras</option>
                                                    <option value="Hong Kong">Hong Kong</option>
                                                    <option value="Hungary">Hungary</option>
                                                    <option value="Iceland">Iceland</option>
                                                    <option value="Indonesia">Indonesia</option>
                                                    <option value="India">India</option>
                                                    <option value="Iran">Iran</option>
                                                    <option value="Iraq">Iraq</option>
                                                    <option value="Ireland">Ireland</option>
                                                    <option value="Isle of Man">Isle of Man</option>
                                                    <option value="Israel">Israel</option>
                                                    <option value="Italy">Italy</option>
                                                    <option value="Jamaica">Jamaica</option>
                                                    <option value="Japan">Japan</option>
                                                    <option value="Jordan">Jordan</option>
                                                    <option value="Kazakhstan">Kazakhstan</option>
                                                    <option value="Kenya">Kenya</option>
                                                    <option value="Kiribati">Kiribati</option>
                                                    <option value="Korea North">Korea North</option>
                                                    <option value="Korea Sout">Korea South</option>
                                                    <option value="Kuwait">Kuwait</option>
                                                    <option value="Kyrgyzstan">Kyrgyzstan</option>
                                                    <option value="Laos">Laos</option>
                                                    <option value="Latvia">Latvia</option>
                                                    <option value="Lebanon">Lebanon</option>
                                                    <option value="Lesotho">Lesotho</option>
                                                    <option value="Liberia">Liberia</option>
                                                    <option value="Libya">Libya</option>
                                                    <option value="Liechtenstein">Liechtenstein</option>
                                                    <option value="Lithuania">Lithuania</option>
                                                    <option value="Luxembourg">Luxembourg</option>
                                                    <option value="Macau">Macau</option>
                                                    <option value="Macedonia">Macedonia</option>
                                                    <option value="Madagascar">Madagascar</option>
                                                    <option value="Malaysia">Malaysia</option>
                                                    <option value="Malawi">Malawi</option>
                                                    <option value="Maldives">Maldives</option>
                                                    <option value="Mali">Mali</option>
                                                    <option value="Malta">Malta</option>
                                                    <option value="Marshall Islands">Marshall Islands</option>
                                                    <option value="Martinique">Martinique</option>
                                                    <option value="Mauritania">Mauritania</option>
                                                    <option value="Mauritius">Mauritius</option>
                                                    <option value="Mayotte">Mayotte</option>
                                                    <option value="Mexico">Mexico</option>
                                                    <option value="Midway Islands">Midway Islands</option>
                                                    <option value="Moldova">Moldova</option>
                                                    <option value="Monaco">Monaco</option>
                                                    <option value="Mongolia">Mongolia</option>
                                                    <option value="Montserrat">Montserrat</option>
                                                    <option value="Morocco">Morocco</option>
                                                    <option value="Mozambique">Mozambique</option>
                                                    <option value="Myanmar">Myanmar</option>
                                                    <option value="Nambia">Nambia</option>
                                                    <option value="Nauru">Nauru</option>
                                                    <option value="Nepal">Nepal</option>
                                                    <option value="Netherland Antilles">Netherland Antilles</option>
                                                    <option value="Netherlands">Netherlands (Holland, Europe)</option>
                                                    <option value="Nevis">Nevis</option>
                                                    <option value="New Caledonia">New Caledonia</option>
                                                    <option value="New Zealand">New Zealand</option>
                                                    <option value="Nicaragua">Nicaragua</option>
                                                    <option value="Niger">Niger</option>
                                                    <option value="Nigeria">Nigeria</option>
                                                    <option value="Niue">Niue</option>
                                                    <option value="Norfolk Island">Norfolk Island</option>
                                                    <option value="Norway">Norway</option>
                                                    <option value="Oman">Oman</option>
                                                    <option value="Pakistan" selected>Pakistan</option>
                                                    <option value="Palau Island">Palau Island</option>
                                                    <option value="Palestine">Palestine</option>
                                                    <option value="Panama">Panama</option>
                                                    <option value="Papua New Guinea">Papua New Guinea</option>
                                                    <option value="Paraguay">Paraguay</option>
                                                    <option value="Peru">Peru</option>
                                                    <option value="Phillipines">Philippines</option>
                                                    <option value="Pitcairn Island">Pitcairn Island</option>
                                                    <option value="Poland">Poland</option>
                                                    <option value="Portugal">Portugal</option>
                                                    <option value="Puerto Rico">Puerto Rico</option>
                                                    <option value="Qatar">Qatar</option>
                                                    <option value="Republic of Montenegro">Republic of Montenegro</option>
                                                    <option value="Republic of Serbia">Republic of Serbia</option>
                                                    <option value="Reunion">Reunion</option>
                                                    <option value="Romania">Romania</option>
                                                    <option value="Russia">Russia</option>
                                                    <option value="Rwanda">Rwanda</option>
                                                    <option value="St Barthelemy">St Barthelemy</option>
                                                    <option value="St Eustatius">St Eustatius</option>
                                                    <option value="St Helena">St Helena</option>
                                                    <option value="St Kitts-Nevis">St Kitts-Nevis</option>
                                                    <option value="St Lucia">St Lucia</option>
                                                    <option value="St Maarten">St Maarten</option>
                                                    <option value="St Pierre & Miquelon">St Pierre & Miquelon</option>
                                                    <option value="St Vincent & Grenadines">St Vincent & Grenadines</option>
                                                    <option value="Saipan">Saipan</option>
                                                    <option value="Samoa">Samoa</option>
                                                    <option value="Samoa American">Samoa American</option>
                                                    <option value="San Marino">San Marino</option>
                                                    <option value="Sao Tome & Principe">Sao Tome & Principe</option>
                                                    <option value="Saudi Arabia">Saudi Arabia</option>
                                                    <option value="Senegal">Senegal</option>
                                                    <option value="Seychelles">Seychelles</option>
                                                    <option value="Sierra Leone">Sierra Leone</option>
                                                    <option value="Singapore">Singapore</option>
                                                    <option value="Slovakia">Slovakia</option>
                                                    <option value="Slovenia">Slovenia</option>
                                                    <option value="Solomon Islands">Solomon Islands</option>
                                                    <option value="Somalia">Somalia</option>
                                                    <option value="South Africa">South Africa</option>
                                                    <option value="Spain">Spain</option>
                                                    <option value="Sri Lanka">Sri Lanka</option>
                                                    <option value="Sudan">Sudan</option>
                                                    <option value="Suriname">Suriname</option>
                                                    <option value="Swaziland">Swaziland</option>
                                                    <option value="Sweden">Sweden</option>
                                                    <option value="Switzerland">Switzerland</option>
                                                    <option value="Syria">Syria</option>
                                                    <option value="Tahiti">Tahiti</option>
                                                    <option value="Taiwan">Taiwan</option>
                                                    <option value="Tajikistan">Tajikistan</option>
                                                    <option value="Tanzania">Tanzania</option>
                                                    <option value="Thailand">Thailand</option>
                                                    <option value="Togo">Togo</option>
                                                    <option value="Tokelau">Tokelau</option>
                                                    <option value="Tonga">Tonga</option>
                                                    <option value="Trinidad & Tobago">Trinidad & Tobago</option>
                                                    <option value="Tunisia">Tunisia</option>
                                                    <option value="Turkey">Turkey</option>
                                                    <option value="Turkmenistan">Turkmenistan</option>
                                                    <option value="Turks & Caicos Is">Turks & Caicos Is</option>
                                                    <option value="Tuvalu">Tuvalu</option>
                                                    <option value="Uganda">Uganda</option>
                                                    <option value="United Kingdom">United Kingdom</option>
                                                    <option value="Ukraine">Ukraine</option>
                                                    <option value="United Arab Erimates">United Arab Emirates</option>
                                                    <option value="United States of America">United States of America</option>
                                                    <option value="Uraguay">Uruguay</option>
                                                    <option value="Uzbekistan">Uzbekistan</option>
                                                    <option value="Vanuatu">Vanuatu</option>
                                                    <option value="Vatican City State">Vatican City State</option>
                                                    <option value="Venezuela">Venezuela</option>
                                                    <option value="Vietnam">Vietnam</option>
                                                    <option value="Virgin Islands (Brit)">Virgin Islands (Brit)</option>
                                                    <option value="Virgin Islands (USA)">Virgin Islands (USA)</option>
                                                    <option value="Wake Island">Wake Island</option>
                                                    <option value="Wallis & Futana Is">Wallis & Futana Is</option>
                                                    <option value="Yemen">Yemen</option>
                                                    <option value="Zaire">Zaire</option>
                                                    <option value="Zambia">Zambia</option>
                                                    <option value="Zimbabwe">Zimbabwe</option>
                                                 </select>

                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="cast">Cast</label>
                                                <input type="text" class="form-control" name="cast" id="cast"  placeholder="Enter Cast">

                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                                <label for="any_disabilty" style="display: inline-flex;">Any Disablity  <input style="margin-top: 14px;margin-left: 10px;" type="checkbox" name="any_disabilty" id="any_disabilty" class="form-control" placeholder="Any Physical Disablity"></label>

                                            <div id="disabilty_input" class="form-group d-none">
                                                <input type="text" name="disabilty" id="disabilty" class="form-control" placeholder="Enter Physical Disablity" >
                                            </div>
                                        </div>
                                         <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="Chronic Disease">Chronic Disease</label>
                                                <input type="text" name="chronic_disease" id="chronic_disease" class="form-control" placeholder="Any Chronic Disease" >
                                            </div>
                                        </div>
                                         <div class="col-md-6" >
                                            <div class="form-group">
                                                <label for="reside_where">Reside Where*</label>
                                                <select name="reside_where" class="form-control" id="reside_where" required>
                                                <option value="">-Select-</option>
                                                <option value="Own House">Own House</option>
                                                <option value="On Rent">On Rent</option>
                                                <option value="Father House">Father House</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6" >
                                            <div class="form-group">
                                                <label for="street_no">Area*</label>
                                                <select name="area_no" id="area_no" class="select2 form-control" required>
                                                    @foreach($areas as $area)
                                                        <option value="{{$area->name}}">{{$area->name}}</option>
                                                    @endforeach
                                                </select>

                                            </div>
                                            <div class="d-none" id="other_area">
                                                <div class="form-group">
                                                    <input type="text" name="area_name" id="area_name" class="form-control" placeholder="New Area">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="address">Address*</label>
                                                <input type="text" id="address" class="form-control"
                                                    placeholder="Address" name="address" value="{{old('address')}}" required>
                                            </div>
                                        </div>

                                    </div>

                                </div>
                                <div class="form-actions">

                                    <button type="submit" class="btn btn-primary">
                                        <i class="la la-check-square-o"></i> Save
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>


                </div>
            </div>
        </div>
    </section>
@endsection

@section('css')
    <link rel="stylesheet" type="text/css" href="{{asset('app-assets/vendors/css/forms/icheck/custom.css')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('app-assets/vendors/css/forms/icheck/icheck.css')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('app-assets/vendors/css/forms/selects/select2.min.css')}}">
@endsection
@section('js')
    <script src="{{asset('app-assets/vendors/js/forms/select/select2.full.min.js')}}" type="text/javascript"></script>
    <script src="{{asset('app-assets/vendors/js/forms/validation/jquery.validate.min.js')}}" type="text/javascript"></script>

    <script src="{{asset('app-assets/vendors/js/forms/validation/additional-methods.min.js')}}" type="text/javascript"></script>
    <script src="{{asset('app-assets/vendors/js/forms/extended/inputmask/jquery.inputmask.bundle.min.js')}}" type="text/javascript"></script>
    <script src="{{asset('js/datatable_buttons.js')}}" type="text/javascript"></script>
    <script src="{{asset('app-assets/vendors/js/extensions/toastr.min.js')}}" type="text/javascript"></script>


    <script type="text/javascript">

    function married_show(param){
        if (param.value== 0) {
            document.getElementById('married_where_div').style.display = "block";
            document.getElementById("married_where").required = true;

            var gender_id = document.getElementById('gender').value;
            if(gender_id == 1){
                $('#add_huband_div').removeClass('d-none');

            }

        }else{
            document.getElementById('married_where_div').style.display = "none";
            document.getElementById("married_where").required = false;
            
            $('#add_huband_div').addClass('d-none');
        }
    }
        $(document).ready(function() {

            $('#cnic').inputmask("99999-9999999-9");
            $('#mobile_number').inputmask("9999-9999999");
            $('#phone').inputmask("9999-9999999");


            $('#area_no').prepend('<option value="" selected="selected"></option>').append('<option value="Other">Other</option>').select2({
                width: '100%',
                placeholder: 'Select Area*',
            }).bind('change', function() {
                if ($(this).val() === 'Other') {
                    $('#other_area').removeClass('d-none');
                }
                else{
                    $('#other_area').addClass('d-none');
                }
            });


            $('input[name="any_disabilty"]').click(function(){
                if($(this).prop("checked") == true){
                    $("#disabilty_input").removeClass('d-none');
                    $('#disabilty').prop('required',true);

                }
                else if($(this).prop("checked") == false){
                    $("#disabilty_input").addClass('d-none');
                    $('#disabilty').prop('required',false);

                }
            });

            $('input[name="minor"]').click(function(){
                if($(this).prop("checked") == true){
                    // $("#cnic_input").addClass('d-none');
                    $('#cnic').prop('required',false);

                }
                else if($(this).prop("checked") == false){
                    // $("#cnic_input").removeClass('d-none');
                    $('#cnic').prop('required',true);

                }
            });

            $('#add_father').prepend('<option value="" selected="selected"></option>').select2({
                width: '100%',
                placeholder: 'Select Father',
            });

            $('#add_husband').prepend('<option value="" selected="selected"></option>').select2({
                width: '100%',
                placeholder: 'Select Husband',
            });

            $("#gender").change(function(){

                if($(this).val() == 1 && $('#maritial_status').val() == 0){
                    $('#add_huband_div').removeClass('d-none');

                }else{
                    $('#add_huband_div').addClass('d-none');

                }
            });
            // if ($('#any_disabilty').attr('checked')) {

            //     console.log('sad');
            //     $("#disabilty_input").removeClass('d-none');
            // } else {
            //     $("#disabilty_input").addClass('d-none');
            // }

            @if (session('print'))
			$.ajax({
				url: '{!! route('member.print_form') !!}',
				method: 'POST',
				data: {
					'_token': '{{ csrf_token() }}',
					'id': '{{ session('print') }}'
				}
			})
					.done(function(data) {
						var tab = window.open('', '_blank');

						if(!tab) {
							swal({
								title: 'Popup Blocker Enabled!',
								text: 'Please add this site to your exception list.',
								icon: 'error',
								closeOnClickOutside: false,
								closeOnEsc: false
							});
						}
						else {
							tab.document.write(data);
							tab.document.close();
							tab.focus();
						}
					});
			@endif
        });


    </script>

@endsection
