Our example is very simple as it only checks one field.
Let's expand this example with a more complex function that checks lots of form fields.
Shows you how to write a script that ensures your form is filled in correctly before it's sent to your server.
Great for "required fields" such as email addresses!
I know there are ways to do this with radio buttons and checkboxes, but can it be done with dropdowns as well? Could you please give me an example of how to check them one at a time and how to concatonate the errors if they exist? The name of my form is "my Form"I have not been able to find code anywhere that incorporates the 2 (That is, empty or alpha). might help: Rather than using alert()s for each field, just concatenate the error messages together into a string (separated by e.g.