Test template rideit_contact_form
Sample code for sending your template
by saitam
HTML
<form id="myform" method="post">
No dynamic variables in this template.<br>
<br><br>
First name:<br>
<input type="text" name="firstname"><br>
Last name:<br>
<input type="text" name="lastname">
E-Mail Text:<br>
<input type="text" name="emailtext"><br>
<button>
Send test
</button>
</form>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.emailjs.com/sdk/2.3.2/email.min.js"></script>
<script type="text/javascript">
(function(){
emailjs.init("user_XDxqJhFRJzPCIlkj41QMJ");
})();
</script>
CSS
body {
font-family: arial;
font-size: 22px;
color: #666;
}
form {
width: 500px;
background: white;
padding: 20px 25px;
margin: auto;
margin-top: 30px;
box-shadow: 0px 1px 2px rgba(0,0,0,0.2);
}
form input,
form textarea {
font: inherit;
padding: 5px 5px;
width: 100%;
margin-top: 3px;
margin-bottom: 15px;
box-sizing: border-box;
}
form button {
border: 1px solid rgba(0,0,0,0.2);
padding: 8px 35px;
font-size: 12px;
background: #888;
color: white;
}
form label {
color: #777;
font-size: 11px;
margin-bottom: 2px;
display: block;
}
JavaScript
var myform = $("form#myform");
myform.submit(function(event){
event.preventDefault();
// Change to your service ID, or keep using the default service
var service_id = "default_service";
var template_id = "rideit_contact_form";
myform.find("button").text("Sending...");
emailjs.sendForm(service_id,template_id,myform[0])
.then(function(){
alert("Sent!");
myform.find("button").text("Send");
}, function(err) {
alert("Send email failed!\r\n Response:\n " + JSON.stringify(err));
myform.find("button").text("Send");
});
return false;
});