How to add a 2nd submit button to a node form? I need to have an extra Save button at the top of my node form.

Pressing the 2nd button should do the same action like the regular one.

The following code creates a 2nd save button:

function MYMODULE_form_MYFORM_alter(&amp;$form, &amp;$form_state, $form_id) {

  $form['actions']['submit2'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Save &amp; View'),
    '#access' =&gt; TRUE,
    '#submit' =&gt; array('node_form_submit'),
    '#weight' =&gt; -10,
  );
}


But how do I put it at the top of the page (the form length is not fixed).
The following code does create a 2nd submit button. 

function MYMODULE_form_MYFORM_alter(&amp;$form, &amp;$form_state, $form_id) {

  $form['actions']['submit2'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Save &amp; View'),
    '#access' =&gt; TRUE,
    '#submit' =&gt; array('node_form_submit'),
    '#weight' =&gt; -10,
  );
}


But since we want it on the top of the form, it's better to put it outside the 'actions' group. So the following code puts it just below the title, ready for styling:

function MYMODULE_form_MYFORM_alter(&amp;$form, &amp;$form_state, $form_id) {

  $form['submit2'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Save &amp; View'),
    '#access' =&gt; TRUE,
    '#submit' =&gt; array('node_form_submit'),
    '#weight' =&gt; -10,
  );