Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Slot Booking Form #308

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions slotBooking/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,39 @@ <h3>Book now, build your dream later.</h3>
<p>Choose appointment mode!</p>
</div>
</div>
<div class="form-input">
<label for="time">Type of Service</label>
<div>
<select name="service" id="service">
<option value="">Select</option>
<option value="InteriorDesigining">Interior Desigining</option>
<option value="ConstructionManagement">Construction Management</option>
<option value="ConsultancyServices">Consultancy Services</option>
<option value="EnvironmentalServices">Environmental Services</option>
<option value="Retrofication">Retrofication</option>
<option value="Destructive&NDTTesting">Destructive and NDT Testing</option>
<option value="none">None</option>
</select>
<p>Choose Type Of Service!</p>
</div>
</div>

<div class="form-input">
<label for="time">Type of Repair </label>
<div>
<select name="repair" id="repair">
<option value="">Select</option>
<option value="HomeRepairs">Home Repairs</option>
<option value="KitchenRepairs">Kitchen Repairs</option>
<option value="BathroomRepairs">Bathroom Repairs</option>
<option value="FurnitureRepairs">Furniture Repairs</option>
<option value="PlumbingRepairs">Plumbing Repairs</option>
<option value="none">None</option>
</select>
<p>Choose Type Of Repair!</p>
</div>
</div>

<div class="form-input">
<label for="address">Address <span>*</span></label>
<div>
Expand Down
6 changes: 3 additions & 3 deletions slotBooking/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ const validateForm=(e)=>{
document.getElementById('slotForm').elements[2].nextElementSibling.style.display = 'none';

let pinFormat = /^\d{6}$/;
if((arr[7].value == '' || arr[7].value == null) || !document.getElementById('slotForm').elements[7].value.match(pinFormat)){
validate(7);
if((arr[9].value == '' || arr[9].value == null) || !document.getElementById('slotForm').elements[9].value.match(pinFormat)){
validate(9);
notSubmit = 1;
}
else
document.getElementById('slotForm').elements[7].nextElementSibling.style.display = 'none';
document.getElementById('slotForm').elements[9].nextElementSibling.style.display = 'none';

if(notSubmit == 0){
const formData = new FormData(document.getElementById("slotForm"));
Expand Down