Conditional logic options are not getting saved

Created on 7 November 2023, 10 months ago
Updated 3 December 2023, 9 months ago

Problem/Motivation

Conditional logic options are not getting saved. Regardless of option chosen in 'Element' column in 'Conditions' tab (Any, All, One), settings are not being saved after clicking on 'Save'.

Steps to reproduce

1. Create a webform with a file field.
2. In Webform configuration (Build > Elements section), choose 'Edit' option for 'Submit button(s)'.
3. Switch to 'Conditions' tab.
4. 'Element' column defaults to 'All'. Switch it to 'Any' or 'One'.
5. Save webform settings.
6. Edit 'Submit button(s)' section again and go to 'Conditions' tab again.
7. Observe, that 'Element' section was reverted to default one - 'Any'.



Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

πŸ‡΅πŸ‡±Poland piotrkonefal

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

Comments & Activities

  • Issue created by @piotrkonefal
  • Status changed to Closed: won't fix 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Attached is an example webform that I used to understand the issue.

    If you are adding only one condition the only valid 'operator' is 'All' because 'Any' or 'One' requires multiple elements to work as expected.

    In code, the 'any' and 'or' is inserted between the elements.

    both:
      '#type': textfield
      '#title': both
      '#states':
        visible:
          - ':input[name="files[file]"]':
              filled: true
          - or
          - ':input[name="textfield"]':
              filled: true
    

    On a related note, I am not sure the file element supports the 'filled' trigger.

    I don't think there is anything to address or fix. We document this nuance but no one has noticed it or complained and it is probably fine AS-IS.

Production build 0.71.5 2024