Multigroup module disables "required" flag for fields in multigroups in the after_build callback to apply custom validation logics. Later in pre_render callback the required flag is restored to show the "required" marks. This works fine on normal form rendering, but when rerendering form after error, it doesn't - "required" marks are missing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

crea’s picture

Attached patch fixes the bug. The problem is that in order to find "required" fields and restore "required" flag for them, Multigroup module relies on "#parents" array, which is different on form submission (since it reflects hierarchy of the submitted values). Switching it to use "#array_parents" solves the problem.
See https://www.drupal.org/node/279246#comment-2292322

crea’s picture

Status: Active » Needs review
crea’s picture

FileSize
1.2 KB

Better coding style