The 6.x fieldgroup module would output the machine name of the group as a CSS class in the fieldset.

For example, if the machine name is group_my_group, the class would be 'group-my-group'.

This helped with js events (for example, opening a fieldset when certain conditions are met in another field).

CommentFileSizeAuthor
#3 1049434_machine_class.patch466 bytesnils.destoop
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stalski’s picture

Indeed. Will be fixed asap.

nils.destoop’s picture

Assigned: Unassigned » nils.destoop
nils.destoop’s picture

FileSize
466 bytes

The group name has been added as css class. Committed to dev, in attachment theres a patch

nils.destoop’s picture

Status: Active » Fixed
jhedstrom’s picture

Awesome. Thanks!

Stalski’s picture

Status: Fixed » Closed (fixed)
anniegreens’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev

It appears that this was altered in the latest dev release (7.x-1.1+67-dev). Why? CSS previously using something like 'group-legal' must now be changed to 'group_legal', the machine name. This is not proper use of drupal_html_class, which lower cases and dashifies strings.

anniegreens’s picture

Status: Closed (fixed) » Active

Sorry. Re-opening.

anniegreens’s picture

Upon further inspection, it appears that class names for new field groups have been moved to the 'Extra CSS classes' text field under configuration for the field group. However, existing field groups prior to upgrading to the latest dev do not get populated.

nils.destoop’s picture

There is an update hook for that. If you run it, all the extra classes will be populated for your existing groups.

nils.destoop’s picture

Status: Active » Closed (fixed)