<div class="modal fade" id="createDependant" role="dialog" >
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content" >
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title" id="dependant-heading">Dependants</h4>
        </div>
        <div class="modal-body" >
            <form id="dependants" method="post" action="{{ route('dependants.store') }}" class="form-inline" style="padding-top:10px;"> 
            {{ csrf_field() }}
            <div class=row style="padding:0px 5px 5px 10px;">                
              <div class=form-group style="padding-left:20px;width=20%">     
              <p>Name<span>*</span></p>	
                  <input name="name" type="text"  class="form-control" id="name" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 30px;float: left;padding: 0px 15px;"
                            required>
              </div>
              <div class=form-group style="padding-left:20px;width=40%">     
              <p>Date of Birth <span>*</span></p>	
              <input name="dateofBirth" type="date" class="form-control" id="dateofBirth" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 30px;float: left;padding: 0px 15px;"
                  >
              </div>
            </div>           
            <div class=row style="padding:0px 5px 5px 10px;">       
            <div class=form-group style="padding-left:20px;width=20%;height:80px;" >     
              <p>Relation<span>*</span></p>	
              <select class="form-control" name="relation" style="width:15em">
              <option value="">Select Relation</option>
                <option value="partner">Spouse</option>
                <option value="child">Child</option>
                <option value="grandchild">Grand child</option>
                <option value="grand-parent">Grand parent</option>
                <option value="ex-spouse">Ex-Spouse</option>
              </select>
              </div> 

            </div><!-- End of third row -->            

            </form> 
        </div>
        <div class="modal-footer">
        <button type="button" value="create" onclick="dependant()" class="btn btn-primary" id="btn-save">Save </button>
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
    </div>
      
  </div>
</div>
<script>
function dependant() {
  document.getElementById("dependants").submit();
 }
</script>