Privacy Policy prima di procedere.').fadeIn(500); return; } if (name.length < 1) { error.html('Inserisci il tuo nome.').fadeIn(500); return; } if (azienda.length < 1) { error.html('Inserisci il nome della tua azienda.').fadeIn(500); return; } if (email.length < 1) { error.html('Inserisci il tuo indirizzo email.').fadeIn(500); return; } if (!validEmail.test(email)) { error.html('Inserisci un indirizzo email valido.').fadeIn(500); return; } if (messaggio.length < 1) { error.html('Inserisci un messaggio.').fadeIn(500); return; } var dataString = 'form-action=send&name='+name+'&azienda='+azienda+'&telefono='+telefono+'&email='+email+'&messaggio='+messaggio+'&formcheckts='+formcheckts+'&formcheck='+formcheck+'&privacyp1checked='+privacyp1checked+'&privacyp2checked='+privacyp2checked; $.ajax({ type: "POST", url: "https://netmoole.it/home", data: dataString, success: function (response) { if ( response == 'ok' ) { error.fadeOut(400); $('#contact-success').fadeIn(1000); $("#form-name, #form-azienda, #form-telefono, #form-email, #form-messaggio").val(''); } else { error.html('Si è verificato un errore durante l\'invio della richiesta. Per favore prova nuovamente.').fadeIn(500); } }, error: function() { error.html('Si è verificato un errore durante l\'invio della richiesta. Per favore prova nuovamente.').fadeIn(500); } }); });