When i have configured field groups on a node_registration content type. The field groups are not copied when setting up private fields for a registration node.
This will provide this functionality.
// Copy field groups.
if (module_exists('field_group')) {
$modes = field_group_info_groups('node_registration', 'workshop');
foreach ($modes as $key => $groups) {
foreach($groups as $group) {
$new_group = clone $group;
$new_group->bundle = $bundle;
$new_group->identifier = $new_group->group_name . '|' . $new_group->entity_type . '|' . $new_group->bundle . '|' . $new_group->mode;
unset($new_group->id);
unset($new_group->export_type);
field_group_group_save($new_group);
}
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | private-fields-fieldgroups-2628016.patch | 1.05 KB | tom robert |
Comments
Comment #2
tom robert commentedComment #3
rudiedirkx commentedOh, "private fields" was such a bad idea. Shame on me. What I use these days is Webform Fields, which allows you per-node registration fields, but with the same NR bundle. Display and Views works differently though...
I'll review and test later.
Comment #4
colinstables commentedCan you provide a link to Webform Fields as i can not find it for node registration module?
Comment #5
rudiedirkx commentedI did provide a link =)
Comment #6
colinstables commentedWell its not working i even searched the whole data base for Webform Fields to no avail can you please attach link here to module sorry :)
Your link leads to a SandBox?
Comment #7
rudiedirkx commented#3 has a link to Webform Fields...
Yes, it's a sandbox.