fix-form,title
This commit is contained in:
@@ -532,6 +532,261 @@ var x = setInterval(function() {
|
||||
</div>
|
||||
<!-- / .container -->
|
||||
</section>
|
||||
<!----------------------------------------------------------------THIRD SECTION---------------------------->
|
||||
<!-- SCALABLE -->
|
||||
<section style="background-color: rgb(239, 246, 252);" class="pt-6 pb-8">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 text-center">
|
||||
<!-- Heading -->
|
||||
<h2 class="font-weight-bold" id="c4">
|
||||
Let us hear from you directly!
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- / .row -->
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-md-6 col-lg-6">
|
||||
<div id="map">
|
||||
<div class="a8">
|
||||
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d3683.849928842932!2d88.4678605!3d22.5847155!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3a0275f866945f23%3A0x3f86621694029a9b!2sBeanstalk%20International%20Preschool%20New%20Town%2C%20Kolkata!5e0!3m2!1sen!2sin!4v1677743209632!5m2!1sen!2sin" width="500" height="460" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="map" data-latitude="22.615367" data-longitude="88.430383" data-style="light" data-info="Hello from Teeny Beans"></div> -->
|
||||
<!--
|
||||
<div style="background-image: url(/assets/img/uk.jpg); border-radius: 10px;border-left:3px solid #0189c8" class="add1 bg-cover overlay overlay-dark overlay-40 shadow-dark">
|
||||
<div class="container">
|
||||
<p style=" color:white;font-size: 14px;">
|
||||
<span style="color: #0189c8; font-size: 16PX;font-weight: bold;">UK:</span><br> Kemp House 160 City Road, London, Ec1v2nx<br>
|
||||
<img style="height: 20px;" src="/assets/img/phone.png" alt="Phone"> +442038077020<br>
|
||||
<img style="height: 15px;" src="/assets/img/message.jpeg" alt="message"> enquiry@iimtt.org<br>
|
||||
</p>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-6">
|
||||
<!-- Form -->
|
||||
<div class="icon-contacts pb-3">
|
||||
<p class="mbr-text align-left mbr-fonts-style display-7">
|
||||
<b>Phone:</b> <a href="tel:+918069459565">080-694-59565</a><br>
|
||||
<b>Email:</b> enquiry@iimtt.org<br>
|
||||
<!-- Follow us:<a href="https://www.facebook.com/IIMTT/" class="text-decoration-none" target="_blank">
|
||||
<img src="/assets/img/icons/social/facebook.svg" class="list-social-icon" alt="logo">
|
||||
</a>
|
||||
<!--<a href="https://twitter.com/iimtt_corporate" class="text-decoration-none" target="_blank">
|
||||
<img src="/assets/img/icons/social/twitter.svg" class="list-social-icon" alt="logo">
|
||||
</a><a href="https://www.instagram.com/iimtt.corporate/" class="text-decoration-none" target="_blank">
|
||||
<img src="/assets/img/icons/social/instagram.svg" class="list-social-icon" alt="logo">
|
||||
</a>-->
|
||||
</p>
|
||||
</div>
|
||||
<div class="alert alert-danger" id="warning" style="display: none;">Fill all the fields!</div>
|
||||
<div class="alert alert-success" id="success" style="display: none;">Thank You! We will contact you soon!</div>
|
||||
<form class="" role="form" method="post">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="form-group mb-5">
|
||||
<!-- Input -->
|
||||
<input type="text" aria-required="true" name="widget-contact-form-name" required
|
||||
class="form-control required name" id="name1" placeholder="Enter your Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="form-group mb-5">
|
||||
<!-- Input -->
|
||||
<input class="form-control" id="phn" type="number" name="telephone"
|
||||
placeholder="Enter your Contact number" required>
|
||||
<p id="phnError" style="color: red; display: none;">Enter a valid phone number</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="form-group mb-5">
|
||||
<!-- Input -->
|
||||
<input type="email" id="email" aria-required="true" name="widget-contact-form-email" required
|
||||
class="form-control required email" placeholder="Enter your Email">
|
||||
<p id="emailError" style="color: red; display: none;">Enter a valid email address</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="addr" name="address" placeholder="Enter your Full Address"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<select id="req" class="form-control" name="gender" required>
|
||||
<option value="">Select Course Name</option>
|
||||
<option value="Graduate Diploma in Montessori Teacher Training">Graduate Diploma in Montessori Teacher Training</option>
|
||||
<option value="Post-graduate Diploma in Montessori Teacher Training">Post-graduate Diploma in Montessori Teacher Training</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<!-- Input -->
|
||||
<textarea type="text" name="widget-contact-form-message" required rows="2" class="form-control required"
|
||||
id="message" placeholder="Enter your Message"></textarea>
|
||||
</div>
|
||||
<!-- / .row -->
|
||||
<div class="form-group mb-0">
|
||||
<button style="background-color: #f7a325;margin:10px 0px;" class="btn btn-sm btn-block lift" type="button"
|
||||
onclick="submitForm()"> Send message</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- / .row -->
|
||||
</div>
|
||||
<!-- / .container -->
|
||||
</section>
|
||||
<!-------------------------------------------------------------------------------------------------->
|
||||
<script type="text/javascript">
|
||||
var option = null;
|
||||
var name = null;
|
||||
var addr = null;
|
||||
var phn = null;
|
||||
var subject = null;
|
||||
var email = null;
|
||||
var message = null;
|
||||
var warning = document.getElementById('warning');
|
||||
var success = document.getElementById('success');
|
||||
var emailError = document.getElementById('emailError');
|
||||
var req = document.getElementById("req");
|
||||
function setOptions(s) {
|
||||
// console.log(s[s.selectedIndex].value); // get value
|
||||
option = s[s.selectedIndex].value;
|
||||
// console.log(s[s.selectedIndex].id); // get id
|
||||
}
|
||||
function submitForm() {
|
||||
name = document.getElementById("name1").value;
|
||||
phn = document.getElementById("phn").value;
|
||||
addr = document.getElementById("addr").value;
|
||||
email = document.getElementById("email").value;
|
||||
message = document.getElementById("message").value;
|
||||
success.style.display = "none";
|
||||
subject = req.options[req.selectedIndex].value;
|
||||
//console.log(name+phn+addr+email+message+subject);
|
||||
if (name == '' || addr == '' || phn == '' || email == '' || message == '' || subject == '') {
|
||||
warning.style.display = "block";
|
||||
} else {
|
||||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
var mobile = /^\d{10}$/;
|
||||
|
||||
if (reg.test(email) == false) {
|
||||
emailError.style.display = "block";
|
||||
}else if (mobile.test(phn) == false) {
|
||||
phnError.style.display = "block";
|
||||
} else {
|
||||
emailError.style.display = "none";
|
||||
warning.style.display = "none";
|
||||
let formData = new FormData();
|
||||
formData.append('formName', 'IIMTT-NewTown-Form');
|
||||
formData.append('business_type', 'iimtt');
|
||||
formData.append('Name', name);
|
||||
formData.append('Email', email);
|
||||
formData.append('Phone', phn);
|
||||
formData.append('Field', subject);
|
||||
formData.append('Address', addr);
|
||||
formData.append('MessageDetails', message + " Course:" + subject);
|
||||
fetch('https://api.teenybeans.in/API/contactFormProcessor/v1/', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
sendMail("teenybeans.info@gmail.com");
|
||||
sendMail("enquiry@beanstalkedu.com");
|
||||
sendWelcomeMail(email);
|
||||
success.style.display = "block";
|
||||
document.getElementById("name1").value = "";
|
||||
document.getElementById("phn").value = "";
|
||||
document.getElementById("addr").value = "";
|
||||
document.getElementById("email").value = "";
|
||||
document.getElementById("message").value = "";
|
||||
|
||||
// window.location.href = "contact-back";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
// if(name)
|
||||
}
|
||||
|
||||
function sendMail(sendEmail) {
|
||||
// ---------Mail sent-----------------
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append("sendMail", "true");
|
||||
formData.append("reciever", sendEmail);
|
||||
formData.append("sender", "IIMTT");
|
||||
formData.append("senderMail", "enquiry@iimtt.org");
|
||||
formData.append("subject", "New IIMTT NewTown Contact Form Fillup");
|
||||
formData.append(
|
||||
"message",
|
||||
"<html><body><p>New IIMTT NewTown Contact form is filled up.</p><br><p>User Details:-</p><table><tr><th>Name:- </th><td>:- " +
|
||||
name +
|
||||
"</td></tr><tr><th>Email:- </th><td>:- " +
|
||||
email +
|
||||
"</td></tr><tr><th>Phone:- </th><td>:- " +
|
||||
phn +
|
||||
"</td></tr><tr><th>Address:- </th><td>:- " +
|
||||
addr +
|
||||
"</td></tr><tr><th>Coures:- </th><td>:- " +
|
||||
subject +
|
||||
"</td></tr><tr><th>Message:- </th><td>:- " +
|
||||
message +
|
||||
"</td></tr></table></body></html>"
|
||||
);
|
||||
fetch("https://mailapi.teenybeans.in/009/", {
|
||||
method: "POST",
|
||||
body: formData
|
||||
})
|
||||
.then(function (response) {
|
||||
response.json().then(function (data) {
|
||||
// console.log(data);
|
||||
});
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.log("Fetch Error :-S", err);
|
||||
});
|
||||
}
|
||||
function sendWelcomeMail(sendEmail) {
|
||||
// ---------Mail sent-----------------
|
||||
//console.log(sendEmail);
|
||||
let formData = new FormData();
|
||||
formData.append("sendMail", "true");
|
||||
formData.append("reciever", sendEmail);
|
||||
formData.append("sender", "IIMTT");
|
||||
formData.append("senderMail", "enquiry@iimtt.org");
|
||||
formData.append("subject", "Thank you for contacting IIMTT.");
|
||||
formData.append(
|
||||
"message",
|
||||
'<html><body style="background-color:#f5f8f5;padding:16px;"><div style="text-align:center"><a href="#"><img style="width:150px;" src="https://iimtt.org/assets/img/iimtt-footer-logo.png"></a></div>'+
|
||||
'<div><b style="font-size:20px">Hi '+name+'</b><p>Thank you for reaching International Institute of Montessori Teacher Training.</p>'+
|
||||
'<p>IIMTT was established to help meet the growing demand for Montessori teachers in India and abroad.Our course equips participants to educate children in the Montessori Method, at the pre-primary level anywhere in the world.</p>'+
|
||||
'<p>Our representative will get in touch with you soon!</p></div><div style="text-align:center"><a style="background-color:#f7a325;color:black;padding:4px 6px;text-decoration:none" class="btn btn-secondary btn-form display-4" href="https://drive.google.com/file/d/11JW1i7annvdjF6rG5vwSFBjIBaMDfAqZ/view?usp=sharing">Download Brochure</a></div><p>Thanks<br>Team IIMTT</p>'+
|
||||
'<div style="text-align:center"><p><b>Follow us</b><br><a href="https://www.facebook.com/IIMTT/" target="_blank"><img style="width:26px;margin-right:10px" src="https://iimtt.org/assets/img/fb.png" alt="Logo"></a><a href="https://www.instagram.com/iimtt.corporate/" target="_blank"><img style="width:26px;margin-right:10px" src="https://iimtt.org/assets/img/insta.png" alt="Logo"></a><a href="https://twitter.com/iimtt_corporate" target="_blank"><img style="width:26px;margin-right:10px" src="https://iimtt.org/assets/img/tw.png" alt="Logo"></a>'+
|
||||
'<a href="https://www.linkedin.com/showcase/international-institute-of-montessori-teacher-training/" target="_blank"><img style="width:30px;" src="https://iimtt.org/assets/img/linkedin.png" alt="Logo"></a><br><hr><b>International Institute of Montessori Teacher Training</b><br>DE-2/B, Raghunathpur, Baguiati, Kolkata, West Bengal 700059<br>© 2021 IIMTT All rights reserved.</p></div></body></html>'
|
||||
);
|
||||
fetch("https://mailapi.teenybeans.in/009/", {
|
||||
method: "POST",
|
||||
body: formData
|
||||
})
|
||||
.then(function (response) {
|
||||
response.json().then(function (data) {
|
||||
console.log(data);
|
||||
});
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.log("Fetch Error :-S", err);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<!----------------------------------------------------------------->
|
||||
<section>
|
||||
<!-- FOOTER -->
|
||||
|
||||
Reference in New Issue
Block a user