I have this Form that works successfully (I know it's not state-of-the-art).
I simply want to add code to make Contact Name field mandatory. Can you help me?


Code:
<script type="text/javascript">
function checkemail(){
var str=document.myform.email_address.value;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if (filter.test(str))
testresults=true;
else {
alert("Please input a valid email address!");
return false;
}
if(document.myform.agree.checked!=1) {
alert("Please check the box to agree to the Terms.");
return false;
}
if(document.myform.ans.value.toLowerCase()!="white") {
alert("Please answer security question correctly: Black or White?");
return false;
}
return true;
}
</script>