Drupal 7 Module Development Tutorial #8: Drupal Form Submit and Validate Functions
In this 8th Drupal video tutorial, I show you how to create submit and validate functions to handle users submitting forms. Specifically, we use the default submit function created by Drupal to prep our information and pass it off to a function which updates the database. We then log a watchdog message so administrators know applications were reviewed.
Lastly, we create a validate function to double check the information received from the form submission to ensure we don't get incorrect values. In doing so, I show you how to set errors on specific form elements. It's important to remember that validate functions are called before submit functions.