Is it possible to change how entity reference field is displayed? I have an entity that I has a taxonomy reference in it.  it currently looks like this



and I want this



Is this one of the options in display options array?  Or is it something different?  How do I change this?

This is my code

$fields['category'] = BaseFieldDefinition::create('entity_reference')
      -&gt;setLabel(t('Category'))
      -&gt;setDescription(t('Section this poll is to appear on'))
      -&gt;setSetting('target_type', 'taxonomy_term')
      -&gt;setTranslatable(TRUE)
            -&gt;setDefaultValueCallback('Drupal\poll\Entity\Poll::getMain')
      -&gt;setDisplayOptions('form', array(
        'type' =&gt; 'entity_reference_autocomplete',
        'weight' =&gt; -10,
        'settings' =&gt; array(
          'match_operator' =&gt; 'CONTAINS',
          'size' =&gt; '60',
          'autocomplete_type' =&gt; 'tags',
          'placeholder' =&gt; '',
        ),
      ))
      -&gt;setDisplayConfigurable('form', TRUE)
            -&gt;setRequired(FALSE);
You just need to set the cardinality of the field.

-&gt;setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)


Note that you need to re-install (to be safe, uninstall before making the change) or write an update function to convert the database structure if you make this change.