diff --git a/templates/index.html b/templates/index.html
index a90323d..aef601e 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -7,250 +7,190 @@
-
-
-
+
+
-
Grand Event
Celebration
+
Grand Event
+
Register Here
@@ -258,55 +198,29 @@
Register Here
const form = document.getElementById("myform");
const qrCodeDiv = document.getElementById("qrcode");
-
- const showError = (field, errorText) => {
- field.classList.add("error");
- const errorElement = document.createElement("small");
- errorElement.classList.add("error-text");
- errorElement.innerText = errorText;
- field.closest(".form").appendChild(errorElement);
- }
-
-
const handleFormData = (e) => {
e.preventDefault();
-
const fullnameInput = document.getElementById("fullname");
const emailInput = document.getElementById("email");
const phnoInput = document.getElementById("phno");
const streamInput = document.getElementById("stream");
const eventInput = document.getElementById("event");
- const fullname = fullnameInput.value.trim();
- const email = emailInput.value.trim();
- const phno = phnoInput.value.trim();
- const stream = streamInput.value;
- const event = eventInput.value;
-
- if (fullname && email && phno && stream && event) {
-
- const qrCodeData = {
- fullname,
- email,
- phno,
- stream,
- event
- };
-
- QRCode.toCanvas(qrCodeDiv, JSON.stringify(qrCodeData), (error) => {
- if (error) {
- console.error("Error generating QR code:", error);
- } else {
- console.log("QR code generated successfully");
- }
- });
- } else {
- console.log("Form validation failed.");
- }
+ const qrCodeData = {
+ fullname: fullnameInput.value.trim(),
+ email: emailInput.value.trim(),
+ phno: phnoInput.value.trim(),
+ stream: streamInput.value,
+ event: eventInput.value
+ };
+
+ QRCode.toCanvas(qrCodeDiv, JSON.stringify(qrCodeData), (error) => {
+ if (error) console.error("Error generating QR code:", error);
+ });
};
form.addEventListener("submit", handleFormData);
-