3

Trying to figure out an answer to this question, have tried to just disable a default CRM.alert using CRM_Core_Session::setStatus(null, false); in hook_postProcess (defined in a drupal module), but alert still pops up (not a problem generally, it pops up in a default style, would like to use CRM.status instead, which works perfectly even outside of CiviCRM, while CRM.alert doesn't). Any advice, please!

2

To clear all status messages and prevent them from being shown to the user, you can do:

CRM_Core_Session::getStatus(TRUE);
  • you are my hero, thanks!! For those, who've been asking for exact code example, here is it: (new CRM_Core_Session)->getStatus(TRUE); – yurg Mar 2 '16 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.