The #states property

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.

Leave a comment