-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform1.js
25 lines (21 loc) · 881 Bytes
/
form1.js
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
const btn = document.getElementById('button11');
document.getElementById('form1')
.addEventListener('submit', function (event) {
event.preventDefault();
btn.value = 'Sending...';
const serviceID = 'service_yom3tug';
const templateID = 'template_i8mjyao';
emailjs.sendForm(serviceID, templateID, this)
.then(() => {
btn.value = 'Send Email';
alert('Contact Us Message Received! Our team is on it.');
}, (err) => {
btn.value = 'Send Email';
alert(JSON.stringify(err));
});
});
const phoneInputField = document.querySelector("#phone");
const phoneInput = window.intlTelInput(phoneInputField, {
utilsScript:
"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js",
});