im searching for a php fix also for a backup! i dont know to much about jquery but this is what ive come up with im using an prebuilt notification box so that part should stay the same the part thaat says this:
$("#botMessage1").ready(function(){
$.MetroMessageBox( {
title:"Wrong input The form wasent filled out correctly",
content:"Please try again input again with proper inputs",
NormalButton:"blue",
ActiveButton:"lightblue"
})
});
that is my notifacation that tells the user that the input it wrong i have plenty of others so if you add an alert box in place of this to make the text look better i can just replace it later! but i need to figure out how to check for a REAL email and all of the other sources ive come to have either not worked or i dont know how to incorporate it into my specific code! can soemone help me please!
$('#contact-form').submit(function(e) {
var valid = true;
$('input[type=text],textarea').each(function() {
if (!$(this).val()) {
valid = false;
$(this).addClass('invalid');
}
if ($(this).is('#email') && $(this).val().indexOf('@') === false) {
valid = false;
$(this).addClass('invalid');
}
});
if (!valid) { $("#botMessage1").ready(function(){$.MetroMessageBox({title:"Wrong input The form wasent filled out correctly",content:"Please try again input again with propper inputs",NormalButton:"blue",ActiveButton:"lightblue"})});
return false;
}
});