-
Notifications
You must be signed in to change notification settings - Fork 243
change in book donation form in address , landmark and alternate phone field #1332
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,10 +88,13 @@ <h2>Book Donation Form π</h2> | |
| <label>Contact Number</label> | ||
| </div> | ||
|
|
||
| <div class="user-box"> | ||
| <textarea rows="4" class="form__input form-control" type="text" name="" id="address" required=""></textarea> | ||
| <label>Address</label> | ||
| <div class="user-box"> | ||
| <h6>Address<h6> | ||
| <textarea row="4" class="form-control" type="text" name="" id="address" required=""></textarea> | ||
| <label for="floatingTextarea2">Address</label> | ||
| </div> | ||
|
|
||
|
|
||
|
|
||
| <div class="user-box"> | ||
| <label>Select Country: </label><br><br> | ||
|
|
@@ -119,15 +122,15 @@ <h2>Book Donation Form π</h2> | |
| </select> | ||
| </div> | ||
| <div class="user-box"> | ||
| <input class="form__input form-control" id="zip" type="text" name="" required=""> | ||
| <input class="form__input form-control" id="zip" type="text" name="" required=""> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove extra space before required |
||
| <label>Zip</label> | ||
| </div> | ||
| <div class="user-box"> | ||
| <input class="form__input form-control" type="text" name="" required=""> | ||
| <input class="form__input form-control" type="text" name=""> | ||
| <label>Landmark (Optional)</label> | ||
| </div> | ||
| <div class="user-box"> | ||
| <input class="form__input form-control" id="alt_contact" type="text" name="" required=""> | ||
| <input class="form__input form-control" id="alt_contact" type="text" name=""> | ||
| <!--onchange="validate_phone(document.getElementById('alt_contact'))"--> | ||
| <label>Alternate Phone (Optional)</label> | ||
| </div> | ||
|
|
@@ -223,19 +226,26 @@ <h2>Book Donation Form π</h2> | |
| if(input.value.match(phone)){ | ||
| return true; | ||
| } | ||
| } | ||
| /*else{ | ||
| alert("Please enter a valid phone number") | ||
| return false; | ||
| }*/ | ||
|
|
||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove these extra lines |
||
|
|
||
| function reset_form(){ | ||
| document.getElementById("donation_form").reset(); | ||
|
|
||
| } | ||
|
|
||
| donationForm.addEventListener('submit',e=>{ | ||
|
|
||
| if(validate_phone(document.getElementById('contact'))){ | ||
| e.preventDefault(); | ||
| const { data, error } = _supabase | ||
|
|
@@ -255,6 +265,8 @@ <h2>Book Donation Form π</h2> | |
| if(res.error){ | ||
| alert(res.error.message); | ||
| } | ||
|
|
||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same Remove extra lines |
||
| else{ | ||
| alert('Data Added'); | ||
| reset_form(); | ||
|
|
@@ -264,6 +276,8 @@ <h2>Book Donation Form π</h2> | |
| else{ | ||
| alert("Please enter a valid phone number") | ||
| } | ||
|
|
||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
| }) | ||
|
|
||
| </script> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these extra lines