When building forms, you will often want to only provide certain options if other options are chosen by a user. For example, there's no need to show the 'open link in new window' checkbox, if the 'make this into a link' checkbox hasn't been ticked. These kinds of dynamic forms haven't been easily available for Drupal... until now, with the
#states for form elements in Drupal 7.
Take a peek at this example of dynamic forms in Drupal 7.
To make one form element be dependent on another element, you may have delved into AJAX, or tried using CTools for form item dependency. Doing it with AJAX isn't simple, and using CTools isn't always an option and includes various caveats. Now, you can make dynamic froms in Drupal 7, straight 'out of the box'!