Note: You can make contact forms quickly with Simfatic Forms.
It is better to do validations both on the client side and on the server side.
Fortunately, there are a few Java Script libraries out there that can emulate HTML5 form validation and widgets, as we'll see later in the tutorial.
Sure, this does mean we're not banishing Java Script for now, but at least we can remove it once the browsers catch up!
In all cases, the form is called That's checking the value's equality with a null String (two single quotes with nothing between them).
When you are asking a reader for their email address, you can use a simple » address validation function to make sure the address has a valid structure. Each option in a drop-down box is indexed in the array Annoyingly, there is no simple way to check which radio button out of a group is selected — you have to check through each element, linked with Boolean AND operators .