Creating sub-fields within a field
For Drupal 6, there was Conditional Fields.

There is no Drupal 7 version yet, but there is an issue which links to field conditional state which at this point is only a sandbox project but seems to be widely used already.