Conditional Fields not triggering visibility condition with CSHS widget on taxonomy reference field

Created on 13 June 2025, about 2 months ago

Problem/Motivation

When using conditional_fields with cshs (Client Side Hierarchical Select) and try to use the visible/invisible condition in a taxonomy reference with "All these values (AND)" dependency, this is not working. The condition is not triggered.

Steps to reproduce

- Install both conditional_field and cshs
- Create a content-type with a taxonomy reference and a text field
- Add a dependency to the text field by matching a value from the taxonomy reference
- Set the cshs widget for the taxonomy reference

Proposed resolution

Since I think the problem is in the Select element id created by the cshs module that add a -0-target-id at the and of the id, the proposed resolution is to add it in the conditional_fields_get_simpler_id() function sto the strigs_to_remove array inside the .module file.
I have attached a patch that should work.

Thank you.

🐛 Bug report
Status

Needs work

Version

4.0

Component

Compatibility w/ other modules

Created by

🇮🇹Italy cicciobat Italy

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024