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.
I am using Conditional Fields to hide 2 fields of type List (text). When the user select a value of another List field in the form they become visible. When they do they are not styled with Chosen even if they are supposed to.
If I make them visible by default (on page loading) Chosen will apply correctly, if they are hiding at page load and visible only after the click (of the dependee), they will show without Chosen.
Comments
Comment #1
Joe_Smith CreditAttribution: Joe_Smith commentedChosen doesn't seem to process select fields if they are initially hidden. This problem was never solved in this issue too: Doesn't work in collapsed fieldset.
Comment #2
Dave ReidChange the default selector to 'select' instead of 'select:visible' in the module configuration.
Comment #3
doxigo CreditAttribution: doxigo commentedThanks for the answer Dave, but the issue changes if you switch the selector to select. it makes the field visible by default and it's not hidden anymore.
Comment #4
sarav.din33 CreditAttribution: sarav.din33 commented@dave, thanks a lot for the answer.