For user who doesn't have "save fieldset state" permission, id attribute of collapsible fieldsets is absent.

Comments

jrockowitz’s picture

The fieldset's id attribute is only needed if the fieldset's state is being saved which is why it is only generated for users with 'save fieldset state' permission.

What do you need the fieldset id for?

You could add an id to any fieldset using a custom or contrib module like http://drupal.org/project/form_alter_ui.

~jake

gease’s picture

Well, any fieldset or form element has id generated by drupal. In this particular case, I needed it for theming, in other cases, it may be needed for javascripting, ajax or something like this. IMHO, it's not a good practice to drop things provided by Drupal core.
Form Alter UI is in development phase and doesn't work well, according to my superficial tests.
I appreciate your work and your module, but nevertheless consider what I reported as bug,

Regards,
Vadim.

jrockowitz’s picture

gease,

Drupal core does not automatically generate an id attribute for fieldsets. (see #49103: Give fieldsets an id)

The problem has been fixed in D7.

Still, you are right this is a bug and I will address this issue in my next release. #907660: Fieldset helper 2.x road map

Thanks,
~jake

jrockowitz’s picture

The issue has been addressed in the fieldset helper 6.x-2.x release (http://drupal.org/node/946000).

Thanks for your patience.
~jake

jrockowitz’s picture

Status: Active » Needs review

Just marking this needs review so that it can be reviewed and closed.

jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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