Override default drupal_set_message() on node creation I am creating a simple basic module that alters the text of a submit button and should change the default creation message with drupal_set_message().

I've found an example about changing the message, and changed the code a little.

 function ask_admin_form_alter(&amp;$form, $form_state, $form_id) {
   if ($form_id == "vragen_node_form") {
     $form['actions']['submit']['#value'] = 'Stel Uw Vraag';
     $form['buttons']['submit']['#submit'][0] = 'ask_admin_node_form_submit';
   }
 }

 function ask_admin_node_form_submit($form, &amp;$form_state) {
   global $user;

   $node = node_form_submit_build_node($form, $form_state);
   $insert = empty($node-&gt;nid);
   node_save($node);
   $node_link = l(t('view'), 'node/'. $node-&gt;nid);
   $watchdog_args = array('@type' =&gt; $node-&gt;type, '%title' =&gt; $node-&gt;title);
   $t_args = array('@type' =&gt; node_get_types('name', $node), '%title' =&gt; $node-&gt;title);

   if ($insert) {
     watchdog('content', '@type: added %title.', $watchdog_args, WATCHDOG_NOTICE, $node_link);
     drupal_set_message(t('Uw vraag is met succes ontvangen en zal zo spoedig mogelijk beantwoord worden.', $t_args));
   }
   else {
     watchdog('content', '@type: updated %title.', $watchdog_args, WATCHDOG_NOTICE, $node_link);
     drupal_set_message(t('U heeft uw vraag met succes gewijzigd.', $t_args));
   }
   if ($node-&gt;nid) {
     unset($form_state['rebuild']);
     $form_state['nid'] = $node-&gt;nid;
     $form_state['redirect'] = 'node/'. $node-&gt;nid;
   }
   else {
     // In the unlikely case something went wrong on save, the node will be
     // rebuilt and node form redisplayed the same way as in preview.
     drupal_set_message(t('Er ging iets mis bij het verzenden van uw vraag.'), 'error');
  }
}


Although the form button is indeed changed to my own text, the message won't change when the node is created.

When I copy and paste the whole tutorial, my node messages won't change, but I also get no error messages.

Does anyone knows what is wrong, or how I can change the message using other code?
Change $form['buttons']['submit']['#submit'][0] to $form['actions']['submit']['#submit'][0] in your HOOK_form_alter().

I don't know why that tutorial has you modifying the $form['buttons'] array. Very few forms will put something as important as the primary Submit button outside of $form['actions'], and certainly not a core form.