Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #2
Yago Elias CreditAttribution: Yago Elias as a volunteer and at CI&T commentedHello @ciss, you are right! this patch should be fine
Comment #3
ciss CreditAttribution: ciss as a volunteer commentedComment #4
ciss CreditAttribution: ciss as a volunteer commented+1 Looks good, even with the minor out of scope whitespace fix.
Comment #5
mmjvb CreditAttribution: mmjvb as a volunteer commentedIndeed, now the comment makes sense!
Comment #6
Dinesh18 CreditAttribution: Dinesh18 as a volunteer commented#2 looks good to me. +1 to RTBC
Comment #8
mcdruidThank you!