Entity reference multi-select I'm trying to make an entity reference field a multi-select options select but I can't seem to find out how to make that happen. Any help is appreciated. Below is the code I'm using.

$fields['some_field'] = BaseFieldDefinition::create('entity_reference')
  -&gt;setLabel(t('Some Field'))
  -&gt;setDescription(t('This is a field.'))
  -&gt;setRevisionable(TRUE)
  -&gt;setSetting('target_type', 'other_entity')
  -&gt;setSetting('handler', 'default')
  -&gt;setTranslatable(TRUE)
  -&gt;setDisplayOptions('view', [
    'label' =&gt; 'hidden',
    'type' =&gt; 'author',
    'weight' =&gt; 0,
  ])
  -&gt;setDisplayOptions('form', [
    'type' =&gt; 'options_select',
    'weight' =&gt; 0,
    'settings' =&gt; [
      'options_select' =&gt; 'multiple',
      'placeholder' =&gt; '',
    ],
  ])
  -&gt;setDisplayConfigurable('form', TRUE)
  -&gt;setDisplayConfigurable('view', TRUE)
  -&gt;setRequired(FALSE);
Ultimately this was answered in a different but similar question I asked. The answer is the code below attached to the field in my entity.

use Drupal\Core\Field\FieldStorageDefinitionInterface;

-&gt;setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)