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.
If you have a form element with the #parents 1, 2 and 3 setting form errors would work when you set it on either "1" or "1][2][3". Thus form_get_error() checks the first parent or all parents, but it doesn't take any interim parents. This doesn't make any sense at all, it should either pick only the full name or any parent name. Attached patch fixes form_get_error() to also check for "interim parents".
Comment | File | Size | Author |
---|---|---|---|
form_api_get_error.patch | 636 bytes | fago | |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedMoving to 8.x
Comment #2
aspilicious CreditAttribution: aspilicious commentedform_api_get_error.patch queued for re-testing.
Comment #4
tim.plunkettDupe of #740834: Form elements cannot be rendered without form_builder().
Comment #5
tim.plunkett