If you add a required List (text) field, displayed as checkboxes, then, make it dependent on another field, the label of the field won't show up. For this to happen the field must be required.
Checkboxes and radios should have a 'form_pre_render_conditional_form_element' function in its pre-render array in order to display a label. The issue is that when a field is required conditional_fields adds a pre_render function to the element array (form_pre_render_conditional_form_element), and this seems to prevent drupal from adding the other pre_render function.
To me this seems like a core drupal bug.
Attached is a patch.
I hope this is clear =P.
Comments
Comment #1
jackbravo commentedOk, yes, this is a core issue: #914792: Custom element properties entirely override default element info properties.
See comment #38. I agree.
Comment #2
jackbravo commentedUntil that issue is resolved, here is a better patch.
Comment #3
AtomicTangerine commentedworks for me! Thank you so much for the nice short patch, I thought I was the problem, turns out it's silly core again.
Comment #4
jackbravo commentedMarked as reviewed then =).
Comment #5
peterpoe commentedVery good, reviewed and committed to dev, thanks!