From 3b1364a10edd0050da6fae0080be7f5dfab79892 Mon Sep 17 00:00:00 2001 From: govindgupta1912 Date: Tue, 13 Jun 2023 17:17:20 +0530 Subject: [PATCH] change in book donation form --- public/donate-book.html | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) 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 @@

Book Donation Form 📚

-
- - +
+
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") } + + })