Module Development

Altering Forms with hook_form_alter() for Drupal 7

Check your version

This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Alternate resources

Sprout Video

This video goes through the process of changing some of the properties of a form with the hook_form_alter() function. This hook is a very powerful tool to be able to modify existing Drupal forms, created by core or contributed modules, and tailor them to your needs.