You need to write a java function to validate the form elements and that will fire when the form is dubmitting using the forms onSubmit event. Here's a simple one for an email address
PHP:
function ValidateForm(formname)
if(form.Email.value == "")
{
alert('You must type in an Email address')
formname.Email.focus();
return false;
}
else if(form.Email.value.indexOf('@')== -1)
{
alert('Your Email address is missing an @ symbol')
formname.Email.focus();
return false;
//if the EmailAddrs does not contain a full stop
}
else if(form.Email.value.indexOf('.')== -1)
{
alert('Your Email address is missing a period')
formname.Email.focus();
return false;
}