Inline entity form complex and cardinatlity I am adding an ief type field to my form with the following 

    $form['inline_entity_form'] = [
        '#type' =&gt; 'inline_entity_form',
        '#op' =&gt; 'add',
        '#entity_type' =&gt; 'my_ent_type',
        '#bundle' =&gt; 'my_bundle',
    ];


I am sure this is something under my nose that i am missing but how do i force this to complex and set a cardinality for this instance?

Grateful for any pointers
Mathew
Try changing the type to inline_entity_form_complex so that you have the following;

$form['inline_entity_form'] = [
    '#type' =&gt; 'inline_entity_form_complex',
    '#op' =&gt; 'add',
    '#entity_type' =&gt; 'my_ent_type',
    '#bundle' =&gt; 'my_bundle',
];


Got the pointer from the following answer. https://drupal.stackexchange.com/a/207582/9906