Closed (fixed)
Project:
Field Group
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 May 2012 at 21:40 UTC
Updated:
24 Sep 2012 at 17:28 UTC
Hi there....
I have a problem with using drupal hide function with fieldgroups...
I am using fieldgroup to make a node type tabbed, using horizontal tabs...
And have spend hours now trying to hide a field with drupals hide($content['field_name']);
Could not make it work until I tried dragging the field out of my horizontal tabs and to the top of all the other fields, and then it worked..... So I'm guessing this is related to fieldgroup module....
If I wanna hide the body i do hide($content['body']); But should the field naming scheme be different now that it is encapsulated in fieldsets?
Comments
Comment #1
acoustika commentedBump...
No one who have a solution to this?
Comment #2
DaneMacaulay commentedTo hide a field within a field group you need to call the hide function on the group then the field.
For instance to hide the field "Phone Number" that is within a Group called "Contact" call hide as such:
hide($content['group_contact']['field_phone_number']);
Comment #3
Stalski commentedIndeed. If the field is already nested, that's the correct way to do it.
Note that branch 2.x is no longer supported.