For example, if your form has a box for the user to type their email address, you might want your form handler to check that they've filled in their address before you deal with the rest of the form.
If the user has not completed more than one field, then they will see an alert box appear for each field that is missing.
Now you know how to write a form validation script that can handle multiple form fields, including text boxes, radio buttons, drop-down lists and check boxes!
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.
The form is large so I didn't want to paste all here, but the snap shot of the items I'm referring to are: Is it possible to make the the text field with name=googlekey required if some selects Google Search in drop down..not required if they make some other selection? The name of the function is validate Form() for a solution to trapping the space being entered. I get my form to work with the validation, but everyone who first submits the form gets this error: "403 No variable substitutions in template"When you reload the page the form sends perfectly. "\n"), then display the final string in an alert box if valid == false. It has three fields which I want to validate but in testing it the first incident of validation causes the alert to pop up but then when I click OK on the alert it submits the form anyway without letting me complete the field and continue to the other fields.