Multiple values in creating a new field instance This is the code I actually have:

$instance = array(
    'field_name' =&gt; FIELD_PROJECT_TAGS,
    'entity_type' =&gt; 'node',
    'label' =&gt; $vocabulary-&gt;name,
    'bundle' =&gt; 'portfolio_project',
    'required' =&gt; true,
    'widget' =&gt; array(
        'type' =&gt; 'taxonomy_autocomplete',
        'behaviors' =&gt; array(
            'multiple values' =&gt; FIELD_CARDINALITY_UNLIMITED,
        ),
    ),
    'display' =&gt; array(
        'default' =&gt; array(
            'type' =&gt; 'taxonomy_term_reference_link',
            'weight' =&gt; 10,
        ),
        'teaser' =&gt; array(
            'type' =&gt; 'taxonomy_term_reference_link',
            'weight' =&gt; 10,
        ),
    )
);
field_create_instance($instance);


What's wrong with this? Why does the portfolio module allways install this field with allowing only one value?

Hope somebody can help. I'm bit frustrated.
Hopefully this will prove useful: To create a field that allows multiple values, you set the cardinality to -1 when using field_create_field.  Then all instances will allow multiple values (provided the widget supports that).

Example:

field_create_field([
  'cardinality' =&gt; -1,
  'field_name' =&gt; 'field_unlimited',
  'type' =&gt; 'special_content',
  'entity_types' =&gt; ['node'],
]);