Unlimited values field - how to hide extra field on node edit When creating a new node, I have this unlimited values field with the "Add new item" button.



That's OK, wonderful.
But when I edit an existing node, I get an UNDESIRED empty extra value added for me:


My real case is with a big compound field, but I thought using this small field as an example would be easier to understand.

I there any way to prevent this "extra" field from being intrusively added?
This would work for all node edit forms:

/**
 * Implements hook_form_BASE_FORM_ID_alter().
 */
function MYMODULE_form_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $field_name = 'field_YOURFIELD';

  if (empty($form[$field_name])) {
    return;
  }

  $field_language = $form[$field_name]['#language'];
  $max_delta = $form[$field_name][$field_language]['#max_delta'];
  unset($form[$field_name][$field_language][$max_delta]);
}