How do you check for an empty field in a form?

How do you check for an empty field in a form?

With which programming language?

This Java Script code can help you -

<form name=“myForm” action=“demo_form.asp” onsubmit=“return validateForm()” method=“post”>
First name: <input type=“text” name=“fname”>
<input type=“submit” value=“Submit”>
</form>

It is nice from you to try to help but this script calls to a function that needs to be (validateForm()) created somewhere…

You forgot to add the code for that function too :slight_smile: