Increase maximum amount of characters for entity reference field (tag style) I have a Drupal 9 installation running Commerce 2. My products use a taxonomy entity reference field (tag style). There's one products category, where I need to have more references in the tag input field than currently allowed (1024 characters).
I looked it up and found a similar post where someone suggested to write a module to increase the maximum input value like so:
function MODULE_field_widget_form_alter(&amp;$element, &amp;$form_state, $context) {

  if ($context['widget']-&gt;getPluginId() == 'entity_reference_autocomplete_tags') {
    if ($element['target_id']['#maxlength'] == 1024) {
      $element['target_id']['#maxlength'] = 3072;
    }
  }
}

So I did that, but it still doesn't let me input more than 1024 characters. Any help would be appreciated. Thank you!
I didn't manage to increase the maxlength of the input, but installed &quot;Autocomplete deluxe&quot; module, which implements the widget input field via jQuery chosen. Now I can set as many values as I like.