-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfire.js
More file actions
25 lines (19 loc) · 835 Bytes
/
fire.js
File metadata and controls
25 lines (19 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var dbRef = new Firebase("https://sheild-55d2c.firebaseio.com/");
var contactsRef = dbRef.child('Registration');
$('.addValue').on("click", function( event ) {
event.preventDefault();
if( $('#usr').val() != '' && $('#eml').val() != '' && $('#reg').val() != '' && $('#pho').val() != '' && $('#sel1').val() != ''){
contactsRef.push({
name: $('#usr').val(),
email: $('#eml').val(),
reg: $('#reg').val(),
phone: $('#pho').val(),
event: $('#sel1').val(),
}
)
swal("Thanks For Registering", "We will get in touch soon "+ $('#usr').val()+".\n\n SHEILD-VIT ", "success");
contactForm.reset();
} else {
sweetAlert("Oops...", "Please fill all required field", "error");
}
});