I'm looking for something similar.
When the user submits the form, I want to run through and verify all the required fields are filled in, and then have a message box pop up saying "Please enter the following required information: *caption of missing field*"
I'm not sure how to manipulate the code in your answer to do this.
Thanks for your help!!