In my node edit form, I have two HS taxonomy forms under a "Vocabularies" collapsible fieldset. Normally this fieldset is open by default and everything works properly, but I did a hook_form_alter to make the fieldset collapsed by default ($form['taxonomy']['#collapsed'] = TRUE;) and this makes the form be some where in between the javascript enabled and disabled forms. Two remove buttons appear for already selected elements and the table is formatted like the non javascript format but as soon as a javascript action is used it all goes to the javascript enabled form.

Comments

bluetegu’s picture

Status: Active » Needs review

Yes, I have the same problem in 5.x-3.0-rc7. I looked into it and I believe I have a fix (line numbers and code refer to 5.x code. Probably the same applies to 6.x)

Replace line 67 in hierarchical_select.js from:

- .find('*').hide().end()
+.find('*').css("display", "none").end()

and problem solved.

Apparently what happens is that collapse.js is executed before hierarchical_select.js, and therefore hides the fieldset div. When hide() is called here on an already hidden element, it does nothing, and therefore once we open the fieldset we see the check box.

wim leers’s picture

Status: Needs review » Needs work

Care to make that into a proper patch? :) Line 67 in HEAD may be different from your line 67. Thanks, bluetegu!

bluetegu’s picture

StatusFileSize
new487 bytes
new487 bytes

Attached please find patches against 5.x-3.x-dev and 6.x-3.x-dev. Not sure whether these are 'proper' patches - if not, let me know what is the procedure I should follow.

wim leers’s picture

Almost there! :) This is the proper procedure: http://drupal.org/patch/create. Thanks for going through this effort now, but it'll pay off later (in both Drupal and non-Drupal work), I promise :)

wim leers’s picture

Title: HS Form Loads Incorrectly Inside Collapsed Fieldset » HS transforms incorrectly inside collapsed fieldsets
Component: Code - Taxonomy » Code
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.