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

Successfully updated SlotBooking Form #286

Open
wants to merge 2 commits 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
40 changes: 37 additions & 3 deletions slotBooking/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,40 @@ <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 All @@ -275,16 +309,16 @@ <h3>Book now, build your dream later.</h3>
</div>
</div>
<div class="form-input">
<label for="pinCode">Message <span>*</span></label>
<label for="pinCode">Service / Repair Description <span>*</span></label>
<div>
<textarea
name="message"
id="message"
cols="30"
rows="1"
placeholder="Enter your project details here..."
placeholder="Describe the issue here..."
></textarea>
<p>Enter project details!</p>
<p>Enter the issue details!</p>
</div>
</div>
<div class="form-input empty-item"></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