Forum Moderators: open
Throw in some .js that checks input, if it's blank, then force the user to fill in some more blanks.
If they get past that, on the server side, of course, you should check all the inputs and let the user know that they pressed enter or clicked submit before all data was filled in.
Firstly, don't have a type="submit" input tag, use a button with an onclick event that calls a javascript function that submits your form. In the form tag add an onsubmit event handler that returns false (this stops the form being submitted directly by the user (on "enter") but will allow it through JS.
eg:
<script type="text/javascript">
function submitform()
{
document.myform.submit();
}
</script>
<form name="myform" onsubmit="return false;">
<input type="text" value="Hi">
<input type="button" onclick="submitform()">
</form>
Remember that any visitor would have to have JavaScript enabled to be able to submit a form like this though.
Josh