Formulario Alta Newsletter
function CheckMultiple5(frm, name) {
for (var i=0; i < frm.length; i++)
{
fldObj = frm.elements[i];
fldId = fldObj.id;
if (fldId) {
var fieldnamecheck=fldObj.id.indexOf(name);
if (fieldnamecheck != -1) {
if (fldObj.checked) {
return true;
}
}
}
}
return false;
}
function CheckForm5(f) {
var email_re = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
if (!email_re.test(f.email.value)) {
alert("Please enter your email address.");
f.email.focus();
return false;
}
var fldcheck = CheckMultiple5(f, "CustomFields[51_5]");
if (!fldcheck) {
alert("Please choose one or more options for field 0. Tipo Cliente");
return false;
}
var fname = "CustomFields_48_5";
var fld = document.getElementById(fname);
if (fld.value == "") {
alert("Please enter a value for field 2. Apellidos");
fld.focus();
return false;
}
var fname = "CustomFields_42_5";
var fld = document.getElementById(fname);
if (fld.value == "") {
alert("Please enter a value for field 3. Móvil");
fld.focus();
return false;
}
var fname = "CustomFields_43_5";
var fld = document.getElementById(fname);
if (fld.value == "") {
alert("Please enter a value for field 6. Localidad");
fld.focus();
return false;
}
var fname = "CustomFields_45_5";
var fld = document.getElementById(fname);
if (fld.value == "") {
alert("Please enter a value for field 7. Provincia");
fld.focus();
return false;
}
var fldcheck = CheckMultiple5(f, "CustomFields[41_5]");
if (!fldcheck) {
alert("Please choose one or more options for field 9. Areas de interés");
return false;
}
var fldcheck = CheckMultiple5(f, "CustomFields[44_5]");
if (!fldcheck) {
alert("Please choose one or more options for field 9.1. Zonas donde realizarias formación");
return false;
}
return true;
}
// ]]-->