Stop system message on create node

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

I've put together a rule that sends an email on a create node for a specific content type and this is working correctly.

However, I would like to prevent the standard message for a node create being displayed and set one of my own.

I've tried adding an action to "Execute custom PHP code" with the following in it:

<?php

  drupal_get_messages
('');
 
drupal_set_message('My message in here','');
?>

The result is that my message is displayed as well as the standard create node message in the form " has been created."

I thought that the drupal_get_messages(''); would clear any existing messages, but this isn't happening.

Could anyone help me out on this? Why would drupal_get_messages(''); not be working as I think it should? Should I be taking a different approach to stopping the system message being displayed?

Any suggestions on this would be much appreciated.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: