field_default_form() contains the following section:

  // If field module handles multiple values for this form element, and we are
  // displaying an individual element, process the multiple value form.
  if (!isset($get_delta) && field_behaviors_widget('multiple values', $instance) == FIELD_BEHAVIOR_DEFAULT) {
    // Store the entity in the form.
    $form['#entity'] = $entity;
    $elements = field_multiple_value_form($field, $instance, $langcode, $items, $form, $form_state);
  }

The comment is missing a "not" and should actually read:

  // If field module handles multiple values for this form element, and we are
  // not displaying an individual element, process the multiple value form.
CommentFileSizeAuthor
#2 comment_in-2901466-2.patch975 bytesyago elias

Comments

ciss created an issue. See original summary.

yago elias’s picture

StatusFileSize
new975 bytes

Hello @ciss, you are right! this patch should be fine

ciss’s picture

Status: Active » Needs review
ciss’s picture

+1 Looks good, even with the minor out of scope whitespace fix.

mmjvb’s picture

Status: Needs review » Reviewed & tested by the community

Indeed, now the comment makes sense!

dinesh18’s picture

#2 looks good to me. +1 to RTBC

  • mcdruid committed 7955d45 on 7.x
    Issue #2901466 by Yago Elias, ciss: Comment in field_default_form() is...
mcdruid’s picture

Status: Reviewed & tested by the community » Fixed

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.