When adding terms to a taxonomy vocabulary, the "Parent terms" scrolling selector list in the "RELATIONS" section only displays 4 items. When dealing with large, complex, hierarchical taxonomies, this makes it difficult and slow to find the parent ([a similar complaint](https://www.drupal.org/forum/support/post-installation/2013-01-12/taxonomy-autocomplete-parent-selector-in-addedit-term) and [another](https://www.drupal.org/node/2676436)).

I would love to be able to use something like the [Simple hierarchical select](https://www.drupal.org/project/shs) or [Client-side hierarchical select](https://www.drupal.org/project/cshs) widget there, but assuming that's not currently possible, how can I simply display a longer list to make the selection a bit easier?

I am guessing there is a file somewhere containing a setting of "4" (unless that's a default) that I would able to increase to "20" for example. I hunted but couldn't find it.

I'd be interested in an answer, even if it would be a core hack that I would have to redo with each update.

![More items in Parent terms select list](https://shared-photos-for-embedding.s3.amazonaws.com/parent-terms-selector.png)

Edit: It seems, from [this link](https://www.facebook.com/photo.php?fbid=10155451517742746), that one solution may involve adding code such as this:

    <?php
    function MyModuleName_form_alter(&$form, &$form_state, $form_id) {
      if ($form_id == 'taxonomy_form_term') {
        $form['relations']['parent']['#size'] = '20';
      }
    }

But where to add it? Or perhaps in a custom module (called MyModuleName)? Perhaps in MyTheme.theme? Or perhaps in a twig file such as html--admin--structure--taxonomy--manage--MyVocabularyName--add.html.twig?