1

We made a visibility rule to display a field when a second field has been filled, and display another field when the second field is empty. It works well, but since we updated Ctools and some Drupal modules, it gives false output.

What I did is:

  • Adding a field with a visibility rule to display the field based on another field value (I left the value empty to display the field when it is empty.)
  • Duplicating that field, and adding the same visibility rule, for which I then selected "Reverse" to display the field when it contains any value

The problem is that the visibility rule doesn't apply for the case when the field is empty, but it works well when the field is not empty, even if I disabled the second rule.

How does the plugin (for the visibility rule) know about empty and non empty fields?

I know that it could be solved with PHP code, but I need to know what I am doing wrong.

0

2 Answers 2

0

Probably it is the difference between if field['und][0]['value'] is set or not. Even if field['und][0]['value'] is empty, it's different with not instancied field.

Try a default value on this field and add an other visibility condition on this default value

0

Thanks guys the problem wasn't caused by visibility rules.

We found an issue with image actions module update not ctools

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.