CREATE A LEAD
function submit_form() {
if (typeof(validateCaptchaAndSubmit) != ‘undefined’) {
validateCaptchaAndSubmit();
} else {
check_webtolead_fields();
//document.WebToLeadForm.submit();
}
}
function check_webtolead_fields() {
if (document.getElementById(‘bool_id’) != null) {
var reqs = document.getElementById(‘bool_id’).value;
bools = reqs.substring(0, reqs.lastIndexOf(‘;’));
var bool_fields = new Array();
var bool_fields = bools.split(‘;’);
nbr_fields = bool_fields.length;
for (var i = 0; i < nbr_fields; i++) {
if (document.getElementById(bool_fields[i]).value == ‘on’) {
document.getElementById(bool_fields[i]).value = 1;
} else {
document.getElementById(bool_fields[i]).value = 0;
}
}
}
}