I have a Boolean field that I'm targeting with ffc conditions, and for some reason the following conditions are not triggering:

  • Hide source field when target field contains a specific string
  • Hide source field when target field doesn't contain a specific string.

I tried the usual values of 1 and 0, and also custom strings such as "yes" and "no", but the condition would never trigger.

We believe this is because in the function _target_string_search, $configuration['target'] is not delimited using curly braces.

Essentially, $context['entity']->$configuration['target'] is checking on the content of ($context['entity']->$configuration first, treating it as an array for the ['target'] portion.

Whereas when we use the curly braces to encapsulate, $context['entity']->{$configuration['target']} means that $configuration['target'] is evaluated first and used as the key for $context['entity'].

(Patch to follow shortly)

Comments

44sunsets created an issue. See original summary.

deadpoet’s picture

StatusFileSize
new1.03 KB

This should do the trick...

deadpoet’s picture

Issue summary: View changes
deadpoet’s picture

Issue summary: View changes