Closed (won't fix)
Project:
Content Construction Kit (CCK)
Version:
6.x-1.x-dev
Component:
fieldgroup.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2007 at 22:11 UTC
Updated:
1 Oct 2009 at 16:33 UTC
Comments
Comment #1
marqpdx commentedSo i found out where in the code it goes:
in the fieldgroup.module, the fieldgroup_form_alter() function, near line 301, i added the following:
old:
and new:
It's a very simple change and adds a good bit of consistency and potential for acting on fieldgroups.
Don't exactly know how to patch, but it's easy enough to add.
thx,
m
Comment #2
smitty commentedWell, I think, the class-Attribute is very special here. Could it be, that it was originally meant to be an id, and wrongly named "class"?
For working with css it would be nice to have a class-attribute, wich is the same for all fieldgroups. So I propose to change the line to:
Comment #3
g76 commentedDid this work for you?
I have been looking for a solution myself. I need to display a background image using css for a fieldgroup, not just individual fields. I have a "pricing" fieldgroup with 2 fields included: price per month, and setup fee. I need both fields and the image behind the whole group, but no class or id to reference with css.
-thanks,
Jen
Comment #4
markus_petrux commentedThere are different options to display a fieldgroup that you can choose from "Display fields". Each method uses a unique class name derived from the group name (underlines are converted to hyphens). This unique class name could be used as a jQuery selector. The HTML elements used are DIV or FIELDSET, which is also a hint.
Also, if you use the 'simple' display option, you can then override the template. The default one is shipped in the fieldgroup module folder: fieldgroup.tpl.php
If you need any of the 'fieldset' display options, then you can override theme_fieldgroup_fieldset (default is in fieldgroup.module) from your theme.
Comment #5
markus_petrux commentedWe cannot add id because these should be unique in the DOM, and we may be rendering thge same fieldgroup several times on a single page, using Panels for example. So unique ID per group is no go in CCK. That doesn 't mean it can be done in custom module, as described in #4.