This screencast is a part of the epic learning series "Four weeks of Drupal", chapter "Introduction to theming". You can view the full series at dev.nodeone.se/en/four-weeks-of-drupal.

Please post any comments over there, or we won't see them. Sorry.
---
The #states property is normally used for showing or hiding form elements, depending on the values of other elements. This screencast shows an implementation of this that may be of use if you're trying to understand this setting yourself.

*Note that themes should only use alter hooks for cosmetic purposes! Other alters should go into module.*

Useful links:
api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#states
api.drupal.org/api/drupal/includes--common.inc/function/drupal_process_states/7
---
This screencast is a part of the epic learning series "Four weeks of Drupal", chapter "Introduction to theming". You can view the full series at dev.nodeone.se/en/four-weeks-of-drupal.

Please post any comments over there, or we won't see them. Sorry.

Loading more stuff…

Hmm…it looks like things are taking a while to load. Try again?

Loading videos…