Select fields with group names in Drupal 7?
You can do that if you use php to generate the allowed values, as you have already read in Select fields with group names?. However, that feature did not go into Drupal core when most of the CCK module for Drupal 6 was included in Drupal 7. The D7 version of CCK tries to provide this feature. As the module page says, it contains: 


  some miscellaneous helpers to do things that core will not do, like maintain the PHP code snippets some fields may have been using to define allowed values (partially working)