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)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ffc-string-checks-boolean-3045088-1.patch | 1.03 KB | deadpoet |
Comments
Comment #2
deadpoet commentedThis should do the trick...
Comment #3
deadpoet commentedComment #4
deadpoet commented