title: Drupal: how to make select list show taxonomy terms in hierarchy?
body: <p>I have a block generated by <a href="https://www.drupal.org/project/finder" rel="nofollow noreferrer">Finder module</a> (simple search mechanism). The block contains a form with select lists of various taxonomy dictionaries.
  Their order, however seems quite random (neither, alphabetical, nor chronological) and lists regions in such an order with no hierarchy:<br>
  <code>Italy, France, Poland, Benelux, ..., Upper Austria, ... Switzerland, Tyrol, Croatia</code><br>
  <a href="https://i.stack.imgur.com/KQ7EF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KQ7EF.png" alt="alt text"></a>
  </p>
  
  <p>The order I expect is my dictionary hierarchy, so:<br>
  <code>Austria, Austria&gt;Tyrol, Austria&gt;Upper Austria, Benelux, Croatia, France, Italy, Poland, Switzerland</code></p>
  
  <p><strong>Do You have any idea how to make the select list items appear in the dictionary hierarchy order?</strong></p>
  
  <hr>
  
  <p><strong>Edit</strong>: Finder configuration:</p>
  
  <pre><code>array(
    'finder_id' =&gt; '5',
    'base' =&gt; 'views',
    'title' =&gt; 'Search results',
    'description' =&gt; 'Finder for search',
    'path' =&gt; 'search',
    'block' =&gt; '1',
    'settings' =&gt; array(
      'form_on_page' =&gt; 0,
      'form' =&gt; array(
        'prefix' =&gt; '',
        'prefix_format' =&gt; '2',
        'suffix' =&gt; '',
        'suffix_format' =&gt; '2',
        'button_text' =&gt; 'Find',
        'go_text' =&gt; 'Go',
      ),
      'advanced' =&gt; array(
        'no_results' =&gt; array(
          'no_results' =&gt; 'We can\'t find any tours. Try to search for other tours.',
        ),
        'filter' =&gt; 1,
        'submission' =&gt; 1,
        'ahah' =&gt; 0,
        'ahah_effect' =&gt; 'fade',
        'element_combination' =&gt; '2',
        'pager' =&gt; '0',
        'match' =&gt; 'c',
        'goto' =&gt; '',
        'hide_args' =&gt; 1,
        'arg_sep' =&gt; ',',
        'empty_symbol' =&gt; '',
        'show_links' =&gt; 1,
        'show_admin_links' =&gt; 0,
        'cache_finder_find' =&gt; '360',
        'search' =&gt; '0',
        'search_tab' =&gt; 'node',
      ),
      'views' =&gt; array(
        'view' =&gt; 'search_start',
        'displays' =&gt; array(
          'query' =&gt; 'default',
          'output' =&gt; 'default',
        ),
        'results' =&gt; '0',
        'views_args' =&gt; array(
          'args' =&gt; '',
          'delimiter' =&gt; '/',
        ),
      ),
      'i18nstrings' =&gt; array(
        'title' =&gt; array(
          '#i18nstrings' =&gt; 'finder:f5:title',
        ),
        'description' =&gt; array(
          '#i18nstrings' =&gt; 'finder:f5:description',
        ),
        'settings' =&gt; array(
          'form' =&gt; array(
            'prefix' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][form][prefix',
            ),
            'suffix' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][form][suffix',
            ),
            'button_text' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][form][button_text',
            ),
            'go_text' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][form][go_text',
            ),
          ),
          'advanced' =&gt; array(
            'no_results' =&gt; array(
              'no_results' =&gt; array(
                '#i18nstrings' =&gt; 'finder:f5:settings][advanced][no_results][no_results',
              ),
            ),
            'pager' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][advanced][pager',
            ),
            'arg_sep' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][advanced][arg_sep',
            ),
            'empty_symbol' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][advanced][empty_symbol',
            ),
            'cache_finder_find' =&gt; array(
              '#i18nstrings' =&gt; 'finder:f5:settings][advanced][cache_finder_find',
            ),
          ),
        ),
      ),
    ),
    'elements' =&gt; array(
      '0' =&gt; array(
        'finder_element_id' =&gt; '13',
        'finder_id' =&gt; '5',
        'element' =&gt; 'select',
        'title' =&gt; 'Region',
        'weight' =&gt; '0',
        'settings' =&gt; array(
          'form' =&gt; array(
            'description' =&gt; '',
            'prefix' =&gt; '',
            'prefix_format' =&gt; '2',
            'suffix' =&gt; '',
            'suffix_format' =&gt; '2',
            'default_value' =&gt; '',
            'required' =&gt; 0,
            'size' =&gt; '',
            'multiple' =&gt; 0,
            'empty' =&gt; 'prepend',
            'empty_text' =&gt; '- every region -',
          ),
          'choices' =&gt; array(
            'field' =&gt; array(
              'term_data_1.name' =&gt; 'term_data_1.name',
            ),
            'rewrite' =&gt; array(
              'php' =&gt; '',
            ),
            'displays' =&gt; array(
              'query' =&gt; 'default',
            ),
            'views' =&gt; array(
              'args' =&gt; '',
              'delimiter' =&gt; '/',
            ),
          ),
          'advanced' =&gt; array(
            'delimit' =&gt; '',
            'value_combination' =&gt; '0',
          ),
          'i18nstrings' =&gt; array(
            'title' =&gt; array(
              '#i18nstrings' =&gt; 'finder:e13:title',
            ),
            'settings' =&gt; array(
              'form' =&gt; array(
                'description' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e13:settings][form][description',
                ),
                'prefix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e13:settings][form][prefix',
                ),
                'suffix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e13:settings][form][suffix',
                ),
                'default_value' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e13:settings][form][default_value',
                ),
              ),
              'advanced' =&gt; array(
                'delimit' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e13:settings][advanced][delimit',
                ),
              ),
            ),
          ),
        ),
        'element_handler' =&gt; array(
          '#title' =&gt; 'Select list',
          '#module' =&gt; 'finder_optionwidgets',
        ),
        '#_finder_object' =&gt; '1',
      ),
      '1' =&gt; array(
        'finder_element_id' =&gt; '14',
        'finder_id' =&gt; '5',
        'element' =&gt; 'select',
        'title' =&gt; 'Season',
        'weight' =&gt; '1',
        'settings' =&gt; array(
          'form' =&gt; array(
            'description' =&gt; '',
            'prefix' =&gt; '',
            'prefix_format' =&gt; '2',
            'suffix' =&gt; '',
            'suffix_format' =&gt; '2',
            'default_value' =&gt; '',
            'required' =&gt; 0,
            'size' =&gt; '',
            'multiple' =&gt; 0,
            'empty' =&gt; 'prepend',
            'empty_text' =&gt; '- every season -',
          ),
          'choices' =&gt; array(
            'field' =&gt; array(
              'term_data_2.name' =&gt; 'term_data_2.name',
            ),
            'rewrite' =&gt; array(
              'php' =&gt; '',
            ),
            'displays' =&gt; array(
              'query' =&gt; 'default',
            ),
            'views' =&gt; array(
              'args' =&gt; '',
              'delimiter' =&gt; '/',
            ),
          ),
          'advanced' =&gt; array(
            'delimit' =&gt; '',
            'value_combination' =&gt; '0',
          ),
          'i18nstrings' =&gt; array(
            'title' =&gt; array(
              '#i18nstrings' =&gt; 'finder:e14:title',
            ),
            'settings' =&gt; array(
              'form' =&gt; array(
                'description' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e14:settings][form][description',
                ),
                'prefix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e14:settings][form][prefix',
                ),
                'suffix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e14:settings][form][suffix',
                ),
                'default_value' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e14:settings][form][default_value',
                ),
              ),
              'advanced' =&gt; array(
                'delimit' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e14:settings][advanced][delimit',
                ),
              ),
            ),
          ),
        ),
        'element_handler' =&gt; array(
          '#title' =&gt; 'Select list',
          '#module' =&gt; 'finder_optionwidgets',
        ),
        '#_finder_object' =&gt; '1',
      ),
      '2' =&gt; array(
        'finder_element_id' =&gt; '15',
        'finder_id' =&gt; '5',
        'element' =&gt; 'select',
        'title' =&gt; 'Theme',
        'weight' =&gt; '2',
        'settings' =&gt; array(
          'form' =&gt; array(
            'description' =&gt; '',
            'prefix' =&gt; '',
            'prefix_format' =&gt; '2',
            'suffix' =&gt; '',
            'suffix_format' =&gt; '2',
            'default_value' =&gt; '',
            'required' =&gt; 0,
            'size' =&gt; '',
            'multiple' =&gt; 0,
            'empty' =&gt; 'prepend',
            'empty_text' =&gt; '- every theme -',
          ),
          'choices' =&gt; array(
            'field' =&gt; array(
              'term_data_3.name' =&gt; 'term_data_3.name',
            ),
            'rewrite' =&gt; array(
              'php' =&gt; '',
            ),
            'displays' =&gt; array(
              'query' =&gt; 'default',
            ),
            'views' =&gt; array(
              'args' =&gt; '',
              'delimiter' =&gt; '/',
            ),
          ),
          'advanced' =&gt; array(
            'delimit' =&gt; '',
            'value_combination' =&gt; '0',
          ),
          'i18nstrings' =&gt; array(
            'title' =&gt; array(
              '#i18nstrings' =&gt; 'finder:e15:title',
            ),
            'settings' =&gt; array(
              'form' =&gt; array(
                'description' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e15:settings][form][description',
                ),
                'prefix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e15:settings][form][prefix',
                ),
                'suffix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e15:settings][form][suffix',
                ),
                'default_value' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e15:settings][form][default_value',
                ),
              ),
              'advanced' =&gt; array(
                'delimit' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e15:settings][advanced][delimit',
                ),
              ),
            ),
          ),
        ),
        'element_handler' =&gt; array(
          '#title' =&gt; 'Select list',
          '#module' =&gt; 'finder_optionwidgets',
        ),
        '#_finder_object' =&gt; '1',
      ),
      '3' =&gt; array(
        'finder_element_id' =&gt; '17',
        'finder_id' =&gt; '5',
        'element' =&gt; 'text',
        'title' =&gt; 'Full text search',
        'weight' =&gt; '3',
        'settings' =&gt; array(
          'form' =&gt; array(
            'description' =&gt; '',
            'prefix' =&gt; '',
            'prefix_format' =&gt; '2',
            'suffix' =&gt; '',
            'suffix_format' =&gt; '2',
            'default_value' =&gt; '',
            'required' =&gt; 0,
            'field_prefix' =&gt; '',
            'field_suffix' =&gt; '',
            'maxlength' =&gt; '',
            'minlength' =&gt; '',
            'size' =&gt; '',
            'rows' =&gt; '0',
          ),
          'choices' =&gt; array(
            'field' =&gt; array(
              'node_data_field_services.field_services_value' =&gt; 'node_data_field_services.field_services_value',
              'node_data_field_subtitle.field_subtitle_value' =&gt; 'node_data_field_subtitle.field_subtitle_value',
              'node_data_field_text.field_text_value' =&gt; 'node_data_field_text.field_text_value',
              'node_data_field_tips.field_tips_value' =&gt; 'node_data_field_tips.field_tips_value',
              'node_data_field_additional_services.field_additional_services_value' =&gt; 'node_data_field_additional_services.field_additional_services_value',
              'node.title' =&gt; 'node.title',
            ),
            'displays' =&gt; array(
              'query' =&gt; 'default',
            ),
            'views' =&gt; array(
              'args' =&gt; '',
              'delimiter' =&gt; '/',
            ),
          ),
          'advanced' =&gt; array(
            'delimit' =&gt; '',
            'value_combination' =&gt; '0',
          ),
          'i18nstrings' =&gt; array(
            'title' =&gt; array(
              '#i18nstrings' =&gt; 'finder:e17:title',
            ),
            'settings' =&gt; array(
              'form' =&gt; array(
                'description' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e17:settings][form][description',
                ),
                'prefix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e17:settings][form][prefix',
                ),
                'suffix' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e17:settings][form][suffix',
                ),
                'default_value' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e17:settings][form][default_value',
                ),
              ),
              'advanced' =&gt; array(
                'delimit' =&gt; array(
                  '#i18nstrings' =&gt; 'finder:e17:settings][advanced][delimit',
                ),
              ),
            ),
          ),
        ),
        'element_handler' =&gt; array(
          '#title' =&gt; 'Text',
          '#module' =&gt; 'finder_text',
        ),
        '#_finder_object' =&gt; '1',
      ),
    ),
    'elements_index' =&gt; array(
      '13' =&gt; 0,
      '14' =&gt; 1,
      '15' =&gt; 2,
      '17' =&gt; 3,
    ),
    'base_handler' =&gt; array(
      '#title' =&gt; 'Views finder',
      '#module' =&gt; 'finder_views',
    ),
    'admin_links' =&gt; array(
      'search' =&gt; 'View \"Path\"',
      'admin/build/finder/5/edit' =&gt; 'Edit',
    ),
    'links' =&gt; array(),
    '#_finder_object' =&gt; '1',
  )
  </code></pre>