Fields inside conditioned containers are not saved to Drupal

Created on 29 February 2024, 4 months ago
Updated 28 March 2024, 3 months ago

Problem/Motivation

When a container element has a condition applied to it, the field values inside of it aren't submitted to Drupal.

Steps to reproduce

  • Create a form with a simple control field (Radios with values "y" and "n".
  • Add a Fieldset element and configure conditions for it:
    • State: Visibility → Visible (All)
    • Element: Y/N Radios
    • Trigger: Value is
    • Value: y
  • Add fields inside the Fieldset
  • Submit the form from the frontend
  • (investigate the submitted values, in this phase everything is present as they should)
  • Values are not saved to Drupal

Proposed resolution

Update the `Submission::flattenData()` method to find elements under the "dependencies" key in the schema, as currently things under there are being ignored.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇫🇮Finland iSampo

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

Comments & Activities

Production build 0.69.0 2024