Problem/Motivation

When using CSHS in conjunction with Conditional field module and try to manage field with the 'Insert value from widget...' the state is not triggered, this because currently the state is {"visible":{"[name=\u0022field_tipologia_convocazione[0][subform][field_tipo_di_convocazione][0][target_id]\u0022]":["29"]}} and not the correct one {"visible":{"[name=\u0022field_tipologia_convocazione[0][subform][field_tipo_di_convocazione][0][target_id]\u0022]":{"value":"29"}}}.

Steps to reproduce

  • Install both Conditional Fields and CSHS modules
  • Create a Vocabulary with hierarchical tree
  • Add a condition to show a field when the widget value is the one selected
  • Add a content and try to trigger the state

Proposed resolution

Similar to what is do inside the Select state handler of the conditional_fields module, check the condition type, then return an array containing the correct property. I made a patch and it should work with drupal 10.4.* and cshs 4.0.3, the problem is when the state array is generated inside the CshsElementHandler.

Comments

cicciobat created an issue.