Implemented contact form

This commit is contained in:
2016-04-12 07:56:03 +01:00
parent ee6accb687
commit 07c0bbf4ce
3 changed files with 25 additions and 6 deletions

View File

@ -37,12 +37,22 @@ order: 1
</div>
<script>
$("#contactform").submit(function(e){
$("#formcontainer").addClass("completed");
setTimeout(function(){
$("#formcontainer").addClass("completedmsg");
}, 400)
$.post(
"/contactsubmit.php",
{
name: $("input[name='name']").val(),
subject: $("input[name='subject']").val(),
contact: $("input[name='contact']").val(),
message: $("textarea").val()
},
function(){
$("#formcontainer").addClass("completed");
setTimeout(function(){
$("#formcontainer").addClass("completedmsg");
}, 400);
}
)
e.preventDefault();
//alert("done");
return false;
});
</script>