Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I'm experiencing a trouble with the 8.x-1.x-dev version. Whenever I try to add a condition with only one value (out of a list of 4 for example), the dependant doesn't show at all when I select the value on the content type form. No matter if I select the value, or type it or whatever in the content type or in the conditional field editor.
However, it works perfectly if the condition has 2 or more values.
Comments
Comment #2
Clemence.Blazy CreditAttribution: Clemence.Blazy commentedComment #3
Topplestack CreditAttribution: Topplestack commentedAre there any errors in the JS Console. I for instance get:
conditional_fields.js?v=8.x-1.x:78 Uncaught TypeError: Cannot read property 'options' of undefined
at conditional_fields.js?v=8.x-1.x:78
at conditional_fields.js?v=8.x-1.x:224
In my situation, I have a select box List (integer). If I use 'Insert value from widget...' it will not work and throws an error. I believe it is unable to grab the key value. However, if I select any of the 'Set of Values' option and enter the key value from the list, it works, even if I only specify a single value.
I'll look into the code here to see if I can figure out why it's not getting the key value.
Comment #4
beltofte@topplestack I experience a similar problem without any JS errors at all, instead is the value from the widget saved wrong in the config, which cause that the conditional fields are not working. See #2859784-2: Configuration saved wrong in input mode widget.
Comment #5
OlgaRabodzei CreditAttribution: OlgaRabodzei at Adyax commentedWas fixed in the last release(2017-Apr-07). Can someone check it, please?