Flash messages are used to notify the user that something has occurred. For example, a record has been created or they attempted to access something they were not authorized to do.
Questions tagged [flash-message]
408 questions
9
votes
4 answers
Symfony2 - Array to string conversion exception with a flash message
I set a flash message in a controller with the following code:
$this->get('session')->getFlashBag()->add('success', 'Message sent successfully');
And in my template, I use the following to (attempt to) display it:
{% if…

Major Productions
- 5,914
- 13
- 70
- 149
8
votes
3 answers
Where are flash messages stored?
I thought they were stored in cookies - but no, cookies inspecting gives me nothing. Sessions do not store them either. So, where I can find them?
I need this to set them directly (not through flash hash).

fl00r
- 82,987
- 33
- 217
- 237
8
votes
3 answers
Symfony2 - how to clear / edit a flash message
I am setting a flash message in my controller when rendering a twig template.
If there is a post action, I would like to redirect to the same page, but change the flash message.
if ($request->isMethod('POST')) {
...
...
…

Milos Cuculovic
- 19,631
- 51
- 159
- 265
8
votes
2 answers
Intercept incoming flash messages on android mobile
can anyone help me to intercept the incoming Flash messages (specially the ones from the telecom company, where they send our current balance after some activity like message sent).
My application deals with sending SMSes in bulk and I don't want…

Name is Nilay
- 2,743
- 4
- 35
- 77
8
votes
5 answers
How do I use req.flash() with EJS?
I want to be able to flash a message to the client with Express and EJS. I've looked all over and I still can't find an example or tutorial. Could someone tell me the easiest way to flash a message?
Thanks!
user775171
7
votes
2 answers
React Flash Message: How to make the message show without refreshing the page but refresh on 200
I want to show error (or success) message using FlashMessage while having my page reload at desired time
I'm using FlashMessage and my code looks like
render() {
return (
{this.state.error ?

JChao
- 2,178
- 5
- 35
- 65
6
votes
2 answers
How to redirect with flash message react-router 4
Here's what i'm trying to achieve: When a user tries to access a protected page on my ReactJS site, i want to redirect them to the home page with a flash message saying "Please log in" or something similar. How do i achieve this with react-router…

ss_millionaire
- 429
- 2
- 7
- 22
6
votes
1 answer
pass multiple flash warning message with laravel 5
Laravel can only show one message by type of messages (danger, warning, success, info).
There is a solution for passing many warning message (for example) :
In the controller send a tab :
$messagesSuccess = [
'test success 1',
'test success…

ratm
- 913
- 1
- 11
- 20
6
votes
6 answers
Laravel 5.2 Session flash not working even with web middleware
I am trying to implement flash messaging using sessions but am unable to do so.
In my controller I have:
public function store(Request $request) {
session()->flash('donald', 'duck');
session()->put('mickey', 'mouse');
return…

howellmartinez
- 1,195
- 1
- 13
- 24
6
votes
3 answers
display flash and error message after ajax request Laravel
After a successful ajax request, I want to send a flash message to my view (For example, upon editing, I'd like to redirect the user to the homepage with $flash = "Your shop has been update" ). Within the controller, it is easy but I don't know what…

Juan Carlo F. Yarra
- 123
- 1
- 2
- 11
6
votes
2 answers
Display flash messages after login/logout
I have been following this tutorial from the Symfony Book to manage my users.
Now, I would like to set a flash message after the login has succeeded OR if somebody attempts to access a forbidden area.
What I understand is that authentication and…

Creasixtine
- 740
- 3
- 11
- 33
6
votes
3 answers
Checking flash messages in flask application nose tests
On different input values posted to a url of my flask application, it flashes different messages, e.g. 'no data entered', 'invalid input', 'no record found', '3 records found'.
Can someone guide how can I write a nose test to check if the proper…

user2436428
- 1,653
- 3
- 17
- 23
5
votes
1 answer
Why is my Flash.now not outputting after a render?
I have a minor issue I can't seem to figure out.
Regular flash works just as intended.
flash[:test] = 'Blarrgh'
redirect_to etcs_url
Will display 'Blarrgh' since I have this code in my application.html.erb
<% if flash[:test] %>
<%=…

TedTran2019
- 887
- 5
- 15
5
votes
2 answers
displaying Flash message in react
My task is to display flash message("successfully created") on clicking the submit button.[On clicking the submit button , data will be stored in the server]I have run this command npm i react-flash-message.

user3359964
- 347
- 3
- 7
- 16
5
votes
6 answers
Showing flash messages in DJango with close button
I want to display flash messages in Django with the close button.
Existing message framework in Django allows to display messages and does not allow to close it.
As an example, web2py provides such flash messages. I am looking for similar…

Utsav Chokshi
- 1,357
- 1
- 13
- 35