
            <!-- TOP Nav Bar END -->
            <div class="container-fluid">
               <div class="row">
                  <div class="col-sm-12 col-lg-12">
                     <div class="iq-card">
                        <div class="iq-card-header d-flex justify-content-between">
                           <div class="iq-header-title">
                              <h4 class="card-title">Add Page</h4>
                           </div>
                        </div>
                        <div class="iq-card-body">
                           <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vulputate, ex ac venenatis mollis, diam nibh finibus leo</p>
                           <div class="alert alert-success Add" style="display: none;">
                                <strong>Successfully Added Your Data!</strong>
                            </div>
                            <div class="alert alert-danger Adderror" style="display: none;">
                                <strong>Duplicate Entry!</strong>
                            </div>
                           <form role="form" method="post" id="addfrm">
                              <div class="row"> 
                              <div class="col-sm-12 col-lg-6">  
                                 <div class="form-group">
                                    <label for="exampleInputText1">Input Text </label>
                                    <input type="text" class="form-control" id="exampleInputText1" value="" placeholder="First Name">
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">  
                                 <div class="form-group">
                                    <label for="exampleInputText1">Input Text </label>
                                    <input type="text" class="form-control" id="exampleInputText1" value="" placeholder="Last Name">
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">
                                 <div class="form-group">
                                    <label for="exampleInputEmail3">Email ID</label>
                                    <input type="email" class="form-control" id="exampleInputEmail3" value="" placeholder="Enter Email">
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">
                                 <div class="form-group">
                                    <label for="exampleInputphone">Mobile Number</label>
                                    <input type="tel" class="form-control" id="exampleInputphone" value="">
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-4">
                                 <div class="form-group">
                                    <label for="exampleInputdate">Date </label>
                                    <input type="date" class="form-control" id="exampleInputdate" value="2023-10-30">
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-4">
                                 <div class="form-group">
                                    <label for="exampleInputtime">Time </label>
                                    <input type="time" class="form-control" id="exampleInputtime" value="13:45">
                                 </div>
                              </div>
                              <div class="col-sm-12 col-lg-4">
                                 <div class="form-group">
                                    <label for="exampleInputdatetime">Date and Time </label>
                                    <input type="datetime-local" class="form-control" id="exampleInputdatetime" value="">
                                 </div>
                              </div>

                              <div class="col-sm-12 col-lg-6">
                              <div class="form-group">
                                 <label for="exampleFormControlSelect1">Select age</label>
                                 <select class="form-control" id="exampleFormControlSelect1">
                                    <option selected="" disabled="">Select your age</option>
                                    <option>0-18</option>
                                    <option>18-26</option>
                                    <option>26-46</option>
                                    <option>46-60</option>
                                    <option>Above 60</option>
                                 </select>
                              </div>
                              </div>
                              <div class="col-sm-12 col-lg-6">
                                 <div class="form-group">
                                    <label for="exampleFormControlFile1">Example file</label>
                                    <div class="custom-file">
                                       <input type="file" class="custom-file-input" id="customFile">
                                       <label class="custom-file-label" for="customFile">Choose file</label>
                                    </div>
                                 </div>
                              </div>

                              <div class="col-sm-12 col-lg-12">
                              <div class="form-group">
                                 <label for="exampleFormControlTextarea1">Textarea</label>
                                 <textarea class="form-control" id="exampleFormControlTextarea1" rows="5"></textarea>
                              </div>
                              </div>
                              <div class="col-sm-12 col-lg-12">
                              <button type="submit" class="btn btn-primary">Submit</button>
                              <button type="submit" class="btn iq-bg-danger">cancel</button>
                           </div>

                              </div>
                           </form>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
           
<script>
// just for the demos, avoids form submit
jQuery.validator.setDefaults({
success: "valid"
});
$("#addfrm").validate({
rules: {
project_name: {
required: true
}
}
});
</script>
<script>
$(document).ready(function(e) {
$("#addfrm").on('submit', function(e) {
e.preventDefault();
var formStatus = $('#addfrm').validate().form();
if (true == formStatus) {
$.ajax({
type: 'POST',
url: '<?php echo base_url(); ?>vehicle/save',
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
$('.addbtn').hide();
$('.addload').show();
},
success: function(msg) {
if(msg=='Success')
{
$(".Add").show();
$('.Add').delay(3000).hide(200);
$('.addbtn').show();
$('.addload').hide();
setInterval(function() {
location.reload();
}, 3000);
}
else
{
$(".Adderror").show();
$('.Adderror').delay(3000).hide(200);
$('.addbtn').show();
$('.addload').hide();

}
}
});
}
});
});
</script>