- πΊπΈUnited States bob.hinrichs
Drupal 10:
I had a field named field_show_number_grantable that I added via form_alter, that was a toggle state field (didn't submit any value but was used on the front-end). I needed it within a field group with group_name of 'group_administrative'1) In my form_alter hook in the field_show_number_grantable array, add '#group' => 'group_administrative'
2) add this function to my module:
function MYMODULE_field_group_form_process(array &$element, &$group, &$complete_form) {
if ($group->group_name == 'group_administrative') {
$group->children[] = 'field_show_number_grantable';
}
}