PHPackages                             danielhurdmint/silverstripe-flashmessage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. danielhurdmint/silverstripe-flashmessage

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

danielhurdmint/silverstripe-flashmessage
========================================

Easy flash messages for Silverstripe

06PHP

Since Apr 19Pushed 2y agoCompare

[ Source](https://github.com/DanielHurdMint/silverstripe-flashmessage)[ Packagist](https://packagist.org/packages/danielhurdmint/silverstripe-flashmessage)[ RSS](/packages/danielhurdmint-silverstripe-flashmessage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

silverstripe-flashmessage
=========================

[](#silverstripe-flashmessage)

[![Scrutinizer](https://camo.githubusercontent.com/dbddee8d9eea935c5f33970f52d1fe6164079fbab1905cc97302696446369334/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f617879722f73696c7665727374726970652d666c6173686d6573736167652e737667)](https://scrutinizer-ci.com/g/axyr/silverstripe-flashmessage/)[![Packagist](https://camo.githubusercontent.com/6eba4c552944c4f3ee8b3e1e2df6c93d31d5aa9c21c77a82176baec15cc1f8d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617879722f73696c7665727374726970652d666c6173686d6573736167652e737667)](https://packagist.org/packages/axyr/silverstripe-flashmessage)[![Packagist](https://camo.githubusercontent.com/054b628f7f6fe842a0bdfa096678f2ebc9dc29cc7d0568f0dd49a8cb7c84c963/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617879722f73696c7665727374726970652d666c6173686d6573736167652e737667)](https://packagist.org/packages/axyr/silverstripe-flashmessage)

Display simple one-time flash message with Twitter Bootstrap or Zurb Foundation markup.

```
    public function submitForm($data, Form $form)
    {
        $form->saveInto($this->record);
        $this->record->write();

        Flash::success('Form saved');

        return $this->controller->redirect($this->controller->Link());
    }
```

Installation
------------

[](#installation)

```
$ composer require axyr/silverstripe-flashmessage

```

Add the template variable `$FlashMessage` to your Page template where you wish the flash dialog to appear.

Usage
-----

[](#usage)

The FlashMessage template has all the markup and attributes so that it will play nicely with the Twitter Bootstrap and Zurb Foundation frameworks.

You can set a colored flash message with te following methods:

```
Flash::info('Some message');
Flash::success('Some message');
Flash::warning('Some message');
Flash::danger('Some message'); // Bootstrap
Flash::alert('Some message'); // Foundation
```

By default the message will be closable, but this can be disabled. You can also set the message to automaticly fadeout.

For this to work, we assume jQuery is used and the flashmessage.js file is added to the Requirements::javascript();

```
Flash::success('You cannot close me', false);
Flash::success('I will fade out', false, true);
```

You can also show the message in a modal window :

```
Flash::modal('Some message');
```

Config
------

[](#config)

```
FlashMessage:
   defaults:
     Type: success
     Closable: true
     FadeOut: false
   supported_methods:
     - info
     - success
     - warning
     - danger
     - alert
     - modal
   template: FlashMessage
   session_name: FlashMessage
   load_javascript: true

```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/694144a8b8fc8fc75b9a768457af81c7a4b3e630b8c4b54e208373dfba4fdac8?d=identicon)[DanielHurdMint](/maintainers/DanielHurdMint)

---

Top Contributors

[![axyr](https://avatars.githubusercontent.com/u/345155?v=4)](https://github.com/axyr "axyr (7 commits)")[![sparkcom](https://avatars.githubusercontent.com/u/4200947?v=4)](https://github.com/sparkcom "sparkcom (7 commits)")[![DanielHurdMint](https://avatars.githubusercontent.com/u/167372126?v=4)](https://github.com/DanielHurdMint "DanielHurdMint (6 commits)")[![tkiehne](https://avatars.githubusercontent.com/u/5288951?v=4)](https://github.com/tkiehne "tkiehne (1 commits)")

### Embed Badge

![Health badge](/badges/danielhurdmint-silverstripe-flashmessage/health.svg)

```
[![Health](https://phpackages.com/badges/danielhurdmint-silverstripe-flashmessage/health.svg)](https://phpackages.com/packages/danielhurdmint-silverstripe-flashmessage)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
