Why is form api ignoring the weight that i'm giving to the action buttons? (node edit page) So, I've implemented hook_form_alter in a custom module. I have added a button to the node edit form of a specific content type. 

However, I can't for the life of me get the new button to display with the standard buttons ie save &amp; preview. It just appears at the top of the page, regardless of the figure that i put in as the weight (I tried 100000000000000)...  Fingers crossed that this is just a 'newbie' oversight :)

Here is the code that I'm using:

function MYMODULE_form_alter(&amp;$form, $form_state, $form_id) {
  if($form_id == 'CONTENTTYPE_node_form') {
    // Add validation for a file
        $form['field_CUSTOMFILE'][0]['#upload_validators']['custom_file_validation'] = array();

    // Add update site button to CONTENTYPE node add/edit form    
         $form['actions']['update_site'] = array(
            '#type' =&gt; 'submit',
            '#value' =&gt; 'Update site',
            '#name' =&gt; 'op',
            '#submit' =&gt; array('MYMODULE_form_submit'), /* NEED this */
            '#weight' =&gt; 99,
            );
         $form['actions']['submit']['#weight'] = 101;
         $form['actions']['preview']['#weight'] = 100;

        return $form;

  }

}


These lines from above were only added today but made no difference... 

$form['actions']['submit']['#weight'] = 101;
$form['actions']['preview']['#weight'] = 100;


As always, anyway pointers would be very much appreciated :)

Edit: 

This question was not answered in the indicated "This question has already a answer" link above... That link explains Drupal 7 specific code, although the post isn't tagged as such... This post was specific to Drupal 6 as tagged... In fact the code in this post didn't work for me because it was using Drupal 7 code :)
I added a cancel button to some Drupal 6 node forms in this fashion:

  $form['buttons']['cancel'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Cancel'),
    '#weight' =&gt; 7,
    '#submit' =&gt; array('MYMODULE_node_form_cancel_submit'),
  );


so I'd suggest changing 'actions' to 'buttons' and see if it works equally well for you.