working from this little form validation script, does anyone know how to check to make sure at least one of several looped in dropdowns have been selected as well. The dropdowns have a php generated name:
<select name="participantqty[<?= $c_row ?>]" id="" class="">
<script type="text/javascript">
function required(){
var first = document.forms["register1"].elements["fname"].value;
var last = document.forms["register1"].elements["lname"].value;
var email = document.forms["register1"].elements["email"].value;
var message = document.forms["register1"].elements["phone"].value;
if(first == null || first == "" || last == null || last == ""){
alert("First and last name fields are required.");
return false;
}
else if(email == null || email == ""){
alert('An email address is required.');
return false;
}
else if(message == null || message == ""){
alert('A phone number is required.');
return false;
}else{return true;}
}
</script>