changes to form script

* reset form after submission
* don't use goal if not set
* show sendmessage and fade after 2500ms

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
master
Toshaan Bharvani 3 years ago
parent fa187dffa6
commit 56acd7765b

@ -85,10 +85,15 @@ jQuery(document).ready(function($) {
complete: function() {
$("#sendmessage").addClass("show");
$("#errormessage").removeClass("show");
$('.contactForm').find("input, textarea").val("");
if(goal) {
$(formname)[0].reset();
$('input[type="text"],textarea').val('');
if(typeof goal !== 'undefined') {
_paq.push(['trackGoal', goal]);
}
$('#sendmessage').show();
setTimeout(function() {
$('#sendmessage').fadeOut();
}, 2500);
}
});
return false;

Loading…
Cancel
Save