I've got several node edit forms that, in most themes, display the 'advanced' group in a sidebar. I have other plans for the sidebar, though, so I don't want that behavior.
I edited some twig and css to make the advanced group appear below the main form, but this is still pretty messy.
In particular, we often have to adjust the author field, and I'd like it at the top all by its lovely self... not buried in a special section.
All of that to say, I see here how to add items to the 'advanced' group, but how can I remove author (and pretty much everything else) from it and just use the field group module to put fields where I want them?
(Field group module currently doesn't let you take fields out of advanced)
I've done some things in MYTHEME.THEME with THEME_node_form_alter (changing submit button label for example), but I can't seem to get it to move author out of the advanced group.
The module way would be fine, too, but is beyond my expertise without some help. (Seems like there would be a market for a "liberate the node form" module or "all fields moveable" module, etc.)
Added because code requested...
function MYTHEME_form_node_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
$form['author']['#group'] = 'SOMETHING HERE?';
}
That isn't complete, so of course can't work.
Looking at the api here, I see the author field is assigned to 'advanced' but I don't know how to assign it to something else.
The relevant portion
$form['author'] = [
'#type' => 'details',
'#title' => $this
->t('Authoring information'),
'#group' => 'advanced',
'#attributes' => [
'class' => [
'node-form-author',
],
],
'#attached' => [
'library' => [
'node/drupal.node',
],
],
'#weight' => 90,
'#optional' => TRUE,
];