In my use case, letting a user build a team of employees, it makes more sense to first have [Add existing content] and then [Add new content].
In other words, the first action I want a user to consider (in a LTR world) is to look for an existing user. If one cannot be found, then the user can create a new one. Logically, this should help reduce duplicates.
I was able to achieve this by simply moving the following block of code (line 726)
if ($controller->getSetting('allow_existing')) {
$element['actions']['ief_add_existing'] = array(
'#type' => 'submit',
'#value' => t('Add existing @type_singular', array('@type_singular' => $labels['singular'])),
'#name' => 'ief-' . $ief_id . '-add-existing',
'#limit_validation_errors' => array(array_merge($parents, array('actions'))),
'#ajax' => array(
'callback' => 'inline_entity_form_get_element',
'wrapper' => $wrapper,
),
'#submit' => array('inline_entity_form_open_form'),
'#ief_form' => 'ief_add_existing',
);
}
above line 688 which starts with
// The user is allowed to create an entity of at least one bundle.
if (count($settings['create_bundles'])) {
// Let the user select the bundle, if multiple are available.
...
Are there more use cases where the opposite is true? If not, would it not make sense then to change the button order to [Add existing] [Add new] ?