0

I am using the Field Group module to group my content input fields in my add and edit node pages. After adding a few groups, I noticed that the Save / Preview buttons moved from the bottom of the page, to a position between my un-grouped content and the groups that I have just created. How do I move the buttons back to the bottom of the page?

1 Answer 1

2

You can change the weight of the Save / preview buttons, and place them at the bottom with form alter.

Weight is used to sort the list of form elements before being output; lower numbers appear before higher numbers.

function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id) {
  // Only change actions container (submit, preview, cancel buttons) weight
  // on node edit forms.
  if (!empty($form['#node_edit_form']) && $form['#node_edit_form'] == TRUE) {
    $form['actions']['#weight'] = 100; 
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.