When using the States API (https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_pr...) to toggle visibility of the plupload form element, I discovered that the description was not included in the toggling -- i.e. the div with class 'plupload-element' was toggled rather than the parent div with classes 'form-item' and 'form-type-plupload' which also contains the description div.

In core's misc/states.js, the element to be toggled is selected with .closest('.form-item, .form-submit, .form-wrapper') (line 506). Since the div with class 'plupload-element' also has the class 'form-wrapper', it gets selected. I figured out that the 'form-wrapper' class is added via theme_container(), so I'm wondering if the plupload element could use a different theme hook so this class would not be added?

(I'm not really sure if this is a bug or a feature request, because using 'container' as the theme hook isn't inherently a problem...)

Comments

slashrsm’s picture

This could be changed in 7.x-2.x. I think we should not change this in 7.x-1.x as it may break stuff for existing websites.

slashrsm’s picture

Version: 7.x-1.3 » 7.x-2.x-dev