Answers.Body: <p>I have not tried but you could probably use the CP Custom JavaScript plugin to force display of <code>.notification.error</code> as the flash only sets <code>display: none;</code> and does not remove the element.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-19T22:15:43.163Z
Answers.Text: That's a great idea, thanks Shane! I'll give that a whirl and let you know how it works out.
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-19T22:07:07.977Z
Answers.LastActivityDate: 2014-08-19T22:07:07.977Z
Answers.UserDisplayName: Shane Hudson
Answers.Body: <p>Not currently. The CP’s Javascript will automatically hide all flash messages 2 or 4 seconds after page load (4 if it’s an error).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-19T22:17:46.243Z
Answers.Text: Fair enough, thanks Brandon. Maybe I'll submit it as an official feature request. ;)
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-19T21:13:06.223Z
Answers.LastActivityDate: 2014-08-19T21:13:06.223Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>It's possible to generate a "flash" error message at the top of the control panel like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>craft()-&gt;userSession-&gt;setError('Your custom plugin error message.');
  </code></pre>
  
  <p>The message appears at the top of the control panel when the page loads, but then fades away after a few seconds. <strong>Is there any way to "pin" the message to the top of the page, so it stays indefinitely?</strong></p>
  
Tags: <plugin-development><error-message>
Title: How do you "pin" a flash error message in the CP?
ThreadText: # How do you "pin" a flash error message in the CP?
  
  (Asked by: username_0 on 2014-08-18)
  
  It's possible to generate a "flash" error message at the top of the control panel like this:
  
  ```php
  craft()->userSession->setError('Your custom plugin error message.');
  
  ```
  
  The message appears at the top of the control panel when the page loads, but then fades away after a few seconds. **Is there any way to "pin" the message to the top of the page, so it stays indefinitely?**
  
  **Tags:** plugin-development, error-message
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-08-19. Score: 2 | Accepted answer
  
  I have not tried but you could probably use the CP Custom JavaScript plugin to force display of `.notification.error` as the flash only sets `display: none;` and does not remove the element.
  
  > **Comments:**
  > **username_0**: That's a great idea, thanks username_1! I'll give that a whirl and let you know how it works out.  
  
  ---
  
  ### Answer by username_2 on 2014-08-19. Score: 1
  
  Not currently. The CP’s Javascript will automatically hide all flash messages 2 or 4 seconds after page load (4 if it’s an error).
  
  > **Comments:**
  > **username_0**: Fair enough, thanks username_2. Maybe I'll submit it as an official feature request. ;)  
  
  ---
  
  