Firebase account.
documentationbasic JS.
Google fonts API.
documentationGoogle Analaytics API.
documentationScroll JS.
documentation
and
- 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
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,
});
}