diff --git a/public/donate-book.html b/public/donate-book.html
index d0fda7c6..cd4c4ca8 100644
--- a/public/donate-book.html
+++ b/public/donate-book.html
@@ -88,10 +88,13 @@
-
-
+
+
Address
+
+
+
+
@@ -119,15 +122,15 @@
Book Donation Form 📚
-
+
-
+
-
+
@@ -223,12 +226,18 @@
Book Donation Form 📚
if(input.value.match(phone)){
return true;
}
+ }
/*else{
alert("Please enter a valid phone number")
return false;
}*/
- }
+
+
+
+
+
+
function reset_form(){
document.getElementById("donation_form").reset();
@@ -236,6 +245,7 @@
Book Donation Form 📚
}
donationForm.addEventListener('submit',e=>{
+
if(validate_phone(document.getElementById('contact'))){
e.preventDefault();
const { data, error } = _supabase
@@ -255,6 +265,8 @@
Book Donation Form 📚
if(res.error){
alert(res.error.message);
}
+
+
else{
alert('Data Added');
reset_form();
@@ -264,6 +276,8 @@
Book Donation Form 📚
else{
alert("Please enter a valid phone number")
}
+
+
})