Fieldsets in D7 don't get the element id, I am using some code from your great theme (the fieldset stuff is great) but I needed fieldset id:

$vars['attributes']['id'][] =  $element['#id'];

etc..

Comments

KarlShea’s picture

+1

This breaks FAPI #states settings since it needs the ID of the fieldset, which doesn't get written out.

emosbaugh’s picture

+1

this may be better. not sure

$element = $vars['element'];
element_set_attributes($element, array('id'));
$vars['attributes'] = $element['#attributes'];
timcosgrove’s picture

Attaching a patch that solves this problem. It restores both id and the class .form-wrapper, both of which are necessary for states.js to operate correctly on fieldsets.

timcosgrove’s picture

StatusFileSize
new739 bytes

Patch attached.

timcosgrove’s picture

Category:feature» bug
Status:Active» Needs review

This is most definitely a bug; changing status to reflect such.

timcosgrove’s picture

StatusFileSize
new780 bytes

Modified the patch to check for the existence of $element['#id'] before attempting to apply it.

CoffeyMachine’s picture

Status:Needs review» Fixed

Looks good to me, committed to 7.x-3.x branch. Thanks

kervi’s picture

i'm sorry but this patch is not commited to version for download available on project page.

Akshita’s picture

Sorry this is not the right place for this issue.

Can anyone help me in disabling the Login link on the home page .(Openpublic Drupal 7).

Thanks
Revathi

Status:Fixed» Closed (fixed)

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