Hi,
first: Thanks for this great rewrite of the hierarchical_select module!
I use yours quite alot!

Now I need to add conditional fields with shs together. But that does not work

Problem: The state of the conditional field always stays visible

I am not sure if I have to post my issue here or in conditional_fields module issue cue?

thanks,

steven

Comments

stevenx’s picture

I am willing to pay if that helps solving the issue fast :)

Grayside’s picture

Given Conditional Fields is built around #states, it's potentially a deeper incompatibility.

Grayside’s picture

Category: support » bug
mazdakaps’s picture

stevenx did you found any solution yet?

stevenx’s picture

no. not yet.
maybe we could hire someone?

omdb’s picture

I'm also looking for this solution

omdb’s picture

I'm also looking for this! If anyone can help please?????

geek-merlin’s picture

I can confirm that SHS neither respects #access nor #disabled.

stborchert’s picture

Status: Active » Postponed (maintainer needs more info)

Committed a small fix for the "disabled" problem (setting #access to FALSE worked before).

Regarding "Conditional fields": I've tested with Drupal 7.23, SHS 7.x-1.x-dev and Conditional fields 7.x-3.x-dev and it worked without any problem. Can you please try again and give detailled information about your configuration and what exactly is not working?

timmey987’s picture

I also have the problem. I also checked all posibiltys to configure shs and conditional fields with no success. The only thing i want is to make fields visible if a taxonomy reference field has one specific term. the taxonomy reference field uses shs. are there any solutions for this problem?

stborchert’s picture

Status: Postponed (maintainer needs more info) » Needs work

Ah ok, now I see. Using an SHS-enabled field as dependee does not work. It seems as Conditional fields couldn't get the fields type even its technically a simple select.
I will have a deeper look onto it and try to fix this.

stborchert’s picture

Project: Simple hierarchical select » Conditional Fields
Version: 7.x-1.x-dev » 7.x-3.x-dev
Status: Needs work » Active

After digging deeper into the code I guess this is an issue of Conditional Fields.
If a field (in this case a select element) is located in a nested array, Conditional Fields is not able to load its data correctly,
There is already a comment (line 285 in conditional_fields.module, function conditional_fields_element_after_build() which adds a todo related to this issue.

Maybe I can provide a patch later so this works even with nested fields.

Just for the reference: the field created by SHS is nested within the following structure:
$element[LANGUAGE_UND][0]['tid']

quiron’s picture

hi folks!

I solved this problem with this hack module, to replicate de shs into checkbox buttons, and syncr the values of both.

https://github.com/ictineo/drupal-sync-taxo-fields

I hope will be helpful

quiron’s picture

Issue summary: View changes

Updated issue summary.

Artemrrr’s picture

waiting patch stBorchert!!!

MLSatya’s picture

Same awaiting the patch from StBorchert. Please. thanks. ps - awesome work.

doppel’s picture

Also waiting for the patch

tanvirahmad’s picture

Issue summary: View changes

Looking for the patch.

Mirkozzo’s picture

patch pls

athaller’s picture

need patch as well -- is broken using #access = 'false' in a custom module as well

mvonfrie’s picture

It is not working the other way as well. I have a SHS term reference field (multiple) which I want to show only when a checkbox is checked. But it doesn't hide when I uncheck the checkbox.

ramil g’s picture

For anyone interested, here's a patch that does this:
https://www.drupal.org/project/conditional_fields/issues/3399173
This is for the 4.x version (Drupal 9 & 10)