Not working in layout_paragraphs

Created on 28 September 2023, about 1 year ago
Updated 23 January 2024, 10 months ago

Problem/Motivation

The conditional_fields functionality of hide/show target fields when the controlled-by field is a select field, is not working inside the layout_paragraphs β†’ module. When used in layout_paragraphs, the target field is always visible regardless of whether the controlled-by field meets the criteria or not.

Steps to reproduce

On a Drupal 9.5+ or 10.2+ site:

  • Install the conditional_fields module
  • Install the paragraphs and layout_paragraphs modules
  • Configure layout_paragraphs so it is able to see and add content from any available paragraph types on your site
  • Ensure your paragraph type contains a Select field where its options act as the condition to trigger the target field visibility
  • Create a new condition using the conditional_fields using any of the paragraph type's fields as the target field and the select/dropdown field as the controlled-by field
  • Add content to any page using the layout_paragraphs and the paragraphs type you created the conditions for
  • You will notice that as you toggle the select/dropdown field to any of the options within it, the target field is visible by default and it's never hidden
  • You should also receive onscreen error messages listing each of the fields in your paragraph type

Proposed resolution

Provide a fix or patch for conditional_fields to work in layout_paragraphs.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mariohernandez Los Angeles

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

Comments & Activities

Production build 0.71.5 2024