Better webform element states

Created on 9 December 2024, 7 months ago

Problem/Motivation

The states should be build like the default behaviour of webform elements. Now it's a custom implementation, but it should match the default behaviour of the webform module.

Feature request
Status

Active

Version

1.0

Component

Code

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

Merge Requests

Comments & Activities

  • Issue created by @jeroen_schipper
  • Changes are ready in the 1.1.x development release. We should still be testing this.

  • 🇧🇪Belgium bernardopaulino Brussels

    I created a patch for the branch 1.4.x that significantly improves the webform element states handling to properly match the default behavior of the webform module and expose multiple triggers/conditions for a single element.

    Key Improvements:

    1. Proper Multiple Triggers Support

    • The original implementation only handled simple single trigger cases
    • New implementation properly handles complex state configurations with multiple triggers and logical operators (and, or, xor)
    • Supports both numeric array structures (alternating triggers/operators) and string key structures

    2. Enhanced GraphQL Schema

    • Added WebformElementStateTrigger type to properly expose trigger details
    • States now include triggers array, operator, and condition fields
    • Each trigger exposes type, value, and element information

    Testing Recommendations:

    • Test with webforms containing complex conditional logic
    • Verify both single and multiple trigger scenarios work correctly
    • Ensure logical operators (and, or, xor) are properly handled
    • Test with various webform element types and trigger conditions
  • 🇧🇪Belgium bernardopaulino Brussels

    bernardopaulino changed the visibility of the branch 3492527-better-webform-element to hidden.

  • 🇧🇪Belgium bernardopaulino Brussels

    bernardopaulino changed the visibility of the branch 3492527-better-webform-element to active.

  • Merge request !14Better webform element states → (Open) created by bernardopaulino
  • Pipeline finished with Success
    9 days ago
    Total: 155s
    #538417
Production build 0.71.5 2024