Support › Forums › Azul – HTML Template › Contact Form Not Working & Can I delete Twitter Feed › Reply To: Contact Form Not Working & Can I delete Twitter Feed
February 18, 2014 at 12:06 am
#3620
Keymaster
In the file scripts.js I have attached you have to change the contact form fuctions. In your file scripts.js you have to replave the next code from the line 160 to 191:
$('.success-message-2').hide();
$('.error-message-2').hide();
var $contactform = $('#contactform');
$contactform.submit(function() {
var postdata = $contactform.serialize();
$.ajax({
type: 'POST',
url: 'php/contact.php',
data: postdata,
dataType: 'json',
success: function(json) {
if(json.valid == 0) {
$('.success-message-2').hide();
$('.error-message-2').hide();
$('.error-message-2').html(json.message);
$('.error-message-2').fadeIn().delay(3000).fadeOut();
}
else {
$('.error-message-2').hide();
$('.success-message-2').hide();
$('#contactform').hide().delay(3000).fadeIn();
$('#contactform input').val('');
$('.success-message-2').html(json.message);
$('.success-message-2').fadeIn().delay(2000).fadeOut();
}
}
});
return false;
});
-
This reply was modified 9 years, 7 months ago by
CreaboxThemes.
-
This reply was modified 9 years, 7 months ago by
CreaboxThemes.
-
This reply was modified 9 years, 7 months ago by
CreaboxThemes.