Thursday, February 27, 2014

Ajax Status Message - Drupal

I was trying to show status message against an ajax call. Was using rules_link to promote nodes clicking on a link. And wanted to show message if it was done.

Here is how I did it....
$commands = array();
$commands[] = ajax_command_prepend('div#ajax-status-messages-wrapper', drupal_set_message(variable_get('limit_po_notification'), 'error'));
return array('#type' => 'ajax', '#commands' => $commands);


No comments:

Post a Comment