Skip to content

Registration Site for students (Events) A webform, web form or HTML form on a web page allows a user to enter data that is sent to a server for processing.

License

Notifications You must be signed in to change notification settings

Otherwa/stunning-disco

Stunning-disco

download download download

Prequisite

In a nutshell

images

and

all-might-youre-next

Introduction

  • Interfacing form data by storing it in JSON format in LiveDataBase [NoSQL Database DOM oriented]//Firebase
  • [For Reference] (https://youtu.be/zx2YoBMfflM)
  • Static page can be rendered as per the person whose going to implement this

Database bridge

Basic Snippet for

Collecting Form Data

// Your web app's Firebase configuration
const mainConfig = {
  apiKey: "",
  authDomain: "",
  databaseURL: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: "",
  appId: ""
};

// Initialize Firebase
firebase.initializeApp(mainConfig);

// Refernece contactInfo collections
let contactInfo = firebase.database().ref("Inventrix_Regs");

// Listen for a submit
document.querySelector(".contact-form").addEventListener("submit", submitForm);

function submitForm(e) {
  e.preventDefault();

  //   Get input Values
  let name = document.getElementById(" ").value;
  let email = 
  let message = 
  let roll = 
  let phone = 
  var rate;
 //all your validation code
  }
  else{
  saveContactInfo(name, email, message,roll,phone,rate);
  //err code
  document.querySelector(".contact-form").reset();
  }
}

// Save infos to Firebase
function saveContactInfo(name, email, message,roll,phone,rate) {
  let newContactInfo = contactInfo.push();
  newContactInfo.set({
    department: roll,
    name: name,
    email: email,
    message: message,
    phone: phone,
    exited: rate,
  });

}

Overview

sys_flow

About

Registration Site for students (Events) A webform, web form or HTML form on a web page allows a user to enter data that is sent to a server for processing.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published