Element values retrieved from top to bottom instead of bottom to top

Created on 13 July 2013, almost 12 years ago
Updated 23 May 2023, almost 2 years ago

Problem

_form_builder_handle_input_element() retrieves element values from the top of the form array hierarchy to the bottom, as it is called by form_builder(), which moves through the hierarchy in that direction because it needs to.

The problem with value retrieval is that a parent's value is retrieved before that if its children, which means that if the children have value callbacks, the parent receives the raw values of its children, which in turn causes its own value to be incorrect.

Proposed solution

Create a form_builder_bottom_to_top() that is called after form_builder() and builds all elements similarly to form_builder(), but from the bottom of the hierarchy up, and only for operations that need to be performed in that order. This will also ensure value retrieval happens after element processing to make sure all child elements exist.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

9.5

Component
FormΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" almost a year ago.

    Since there was no additional information provided since the issue was postponed last year, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].

    Thanks!

Production build 0.71.5 2024