@gizmola
Thank you for you reply.
I tried your suggestion, but i could not find out the issue.
However, i just found a file (main.js) among the js file I used. It contains the following Ajax code. Do you think this handles the form submit event ? If yes, could you pls help me add the redirect to it ?
/*----------- 08. Ajax Contact Form ----------*/
var form = '.ajax-contact';
var invalidCls = 'is-invalid';
var $email = '[name="email"]';
var $validation = '[name="name"],[name="email"],[name="number"],[name="subject"],[name="callchoice"],[name="message"]'; // Must be use (,) without any space
var formMessages = $(form).find('.form-messages');
function sendContact() {
var formData = $(form).serialize();
var valid;
valid = validateContact();
if (valid) {
jQuery.ajax({
url: $(form).attr('action'),
data: formData,
type: "POST"
})
.done(function (response) {
// Make sure that the formMessages div has the 'success' class.
formMessages.removeClass('error');
formMessages.addClass('success');
// Set the message text.
formMessages.text(response);
// Clear the form.
$(form + ' input:not([type="submit"]),' + form + ' textarea').val('');
})
.fail(function (data) {
// Make sure that the formMessages div has the 'error' class.
formMessages.removeClass('success');
formMessages.addClass('error');
// Set the message text.
if (data.responseText !== '') {
formMessages.html(data.responseText);
} else {
formMessages.html('Oops! An error occured and your message could not be sent.');
}
});
};
};