[edit] client side validation WIP

et#31
tribikram 2 years ago
parent 4a305d6a92
commit 6243e4f6b9
  1. 8
      public/frontend/css/style.css
  2. 31
      resources/views/enquiry-form.blade.php
  3. 2
      resources/views/layout/app.blade.php

@ -248,7 +248,7 @@ Responsive Codes
.top-links{ .top-links{
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.8rem; gap: 1.8rem;
color: #000000; color: #000000;
margin-right: 0; margin-right: 0;
} }
@ -1715,6 +1715,12 @@ table.lightgrey-weekends tbody td:nth-child(n+6) {
letter-spacing: 0.005em; letter-spacing: 0.005em;
color: #326CBF; color: #326CBF;
} }
#married{
display: none;
}
.married{
display: block !important;
}
/* enquiry page css ends */ /* enquiry page css ends */
/* Footer Css */ /* Footer Css */

@ -88,7 +88,7 @@
</div> </div>
</div> </div>
<h3>Addidional Information</h3> <h3>Additional Information</h3>
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group mb-3"> <div class="form-group mb-3">
<label for="name">Highest Qualification</label> <label for="name">Highest Qualification</label>
@ -148,19 +148,19 @@
<label for="name">Marital Status</label> <label for="name">Marital Status</label>
<div class="d-flex gap-2 mt-2" onclick="maritalStatus()"> <div class="d-flex gap-2 mt-2" onclick="maritalStatus()">
<div class="form-check"> <div class="form-check">
<input class="form-check-input marital-status" type="radio" name="marital-status" value="Male"/> <input class="form-check-input marital-status" id="marital-status" type="radio" name="marital-status" value="Single"/>
<label class="form-check-label"> <label class="form-check-label">
Single Single
</label> </label>
</div> </div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input marital-status" type="radio" name="marital-status" value="Female"/> <input class="form-check-input marital-status" id="marital-status" type="radio" name="marital-status" value="Married"/>
<label class="form-check-label"> <label class="form-check-label">
Married Married
</label> </label>
</div> </div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input marital-status" type="radio" name="marital-status" value="Other"/> <input class="form-check-input marital-status" id="marital-status" type="radio" name="marital-status" value="Widow"/>
<label class="form-check-label"> <label class="form-check-label">
Widow Widow
</label> </label>
@ -168,25 +168,25 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4" id="married">
<div class="form-group mb-3"> <div class="form-group mb-3">
<label for="name">Married date: (Only if Married if not Leave it bank)</label> <label for="name">Married date: (Only if Married if not Leave it bank)</label>
<input type="date" class="form-control mt-2" id="married-date" name="married-date"> <input type="date" class="form-control mt-2" id="married-date" name="married-date">
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4" id="married">
<div class="form-group mb-3"> <div class="form-group mb-3">
<label for="name">Spouse Academics</label> <label for="name">Spouse Academics</label>
<input type="text" class="form-control mt-2" id="spouse-academics" name="spouse-academics" placeholder="Enter your Spouse Academics"> <input type="text" class="form-control mt-2" id="spouse-academics" name="spouse-academics" placeholder="Enter your Spouse Academics">
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4" id="married">
<div class="form-group mb-3"> <div class="form-group mb-3">
<label for="name">Work Experience of Spouse</label> <label for="name">Work Experience of Spouse</label>
<input type="text" class="form-control mt-2" id="spouse-work-experience" name="spouse-work-experience" placeholder="Enter Work Experience of Spouse"> <input type="text" class="form-control mt-2" id="spouse-work-experience" name="spouse-work-experience" placeholder="Enter Work Experience of Spouse">
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4" id="married">
<div class="form-group mb-3"> <div class="form-group mb-3">
<label for="name">Spouse Salary Mode</label> <label for="name">Spouse Salary Mode</label>
<input type="text" class="form-control mt-2" id="spouse-salary-mode" name="spouse-salary-mode" placeholder="Enter Spouse Salary Mode"> <input type="text" class="form-control mt-2" id="spouse-salary-mode" name="spouse-salary-mode" placeholder="Enter Spouse Salary Mode">
@ -217,3 +217,18 @@
</form> </form>
</section> </section>
@endsection @endsection
@section('script')
<script>
function maritalStatus(){
var maritalStatus = document.getElementsByClassName('marital-status');
var marriedInput = document.getElementById('married');
for(var i=0;i<maritalStatus.length;i++){
if(maritalStatus[i].value == 'Married'){
marriedInput.classList.add('married');
}
console.log(maritalStatus[i].value)
}
}
</script>
@endsection

@ -62,7 +62,7 @@
</div> </div>
<div class="social-links d-none d-md-flex align-items-center"> <div class="social-links d-none d-md-flex align-items-center">
<div class="top-links"> <div class="top-links">
<a href="/enquiry" target="_blank">Enquiry</a> <a href="/enquiry">Enquiry</a>
<h2>Find us on</h2> <h2>Find us on</h2>
</div> </div>
<div class="top-socials"> <div class="top-socials">

Loading…
Cancel
Save