Questions tagged [flash-message]

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.

408 questions
3
votes
1 answer

Zend Framework - Flashmessenger - Only one character

I have a little problem with FlashMessenger. When I want to retrieve the messages in my layout, it writes the first letter of the message... example "test" displays "t". I tried a solution posted in this question, but nothing changed for me. I use…
Raphaël
  • 1,141
  • 3
  • 18
  • 32
3
votes
1 answer

Flash is not displayed in the same view in Rails

I need to display flash in the same view (:edit) after successfully updating an object. If I redirect to another action - everything works correctly. But when I need to stay in :edit - doesn't work. Can someone explain to me what is my mistake...…
Yurii
  • 37
  • 5
3
votes
3 answers

Flask flash message not closing on clicking the 'x' button

I have a flask python code for user login and change password. When I change password I need to flash a message whether password was changed correctly or not. {% with messages = get_flashed_messages() %} {% if messages %} …
Aayush Lakkad
  • 97
  • 2
  • 14
3
votes
4 answers

Translation of flash messages with parameters in Symfony 4

I have a problem with flash messages in Symfony 4 and translation. Translation of simple flash messages is working fine: $this->addFlash('success', 'flashmessage.project_deleted'); But now I want to add some parameters to the flash messages and I…
Ingrid
  • 33
  • 1
  • 5
3
votes
4 answers

flask pass variable from one function to another function

As you can see the code. I want to pass variable q from function home() into function search(). @app.route("/",methods=['GET','POST']) def home(): result = Mylist.query.all() return render_template('index.html',result=result) q =…
nupur
  • 91
  • 1
  • 1
  • 11
3
votes
1 answer

Flash Messages are not working express/nodejs/ejs

Flash messages seem to not be working and I think I am missing something super obvious, but I've been at it an hour, and I still have no idea on why it is not working. My Middleware: // Session middleware app.use(session({ secret:…
William
  • 1,175
  • 2
  • 17
  • 32
3
votes
2 answers

I'm trying to implement `link_to` in a flash message for an update action in a controller in Rails but I cannot get it to render to the browser

I have a controller like this in my project: class BriefcasesController < ApplicationController ... def update @super_power = SuperPower.find(params[:super_power_id]) @briefcase.contents.delete(params[:super_power_id].to_s) …
3
votes
3 answers

Laravel flash or session messages not expiring [ not maintained Updated ]

Updated after some research After some research I conclude that, my sessions are not maintained until I save them explicitly, below code works well, but WHY???? Ref here Session::put('lets_test', 2); Session::save(); Old Question I'm new to laravel…
Gaurav Rai
  • 900
  • 10
  • 23
3
votes
2 answers

Rails - `flash.discard` vs `flash.delete`

As title, I wonder what's the difference between Rails flash.discard and flash.delete.
Trantor Liu
  • 8,770
  • 8
  • 44
  • 64
3
votes
1 answer

Laravel flash message showing after refresh

I have one problem. I am building one application with Laravel and on the page where I upload the picture I need one flash success message that says you successfully uploaded new picture. When I upload, it works, shows the flash message, but when I…
3
votes
1 answer

Cannot get flash data to work to a page after register

So I am trying to get from login screen to admin screen, and I set flash data so I can tell the users if they are logged in, and also check if there is more than one user or a wrong password it will show sorry you are not logged in. So this is my…
Masnad Nihit
  • 1,986
  • 2
  • 21
  • 40
3
votes
0 answers

Rails redirects to 422 instead of using flash messages for validations

Rails correctly handles a validation on a forum system, ensuring a post contains text. The issue is that if the validation fails, it redirects to 422 instead of back to the new action. The following is from the rails output: Completed 422…
njny
  • 559
  • 2
  • 15
3
votes
2 answers

Session->flash is not showing session message in CakePHP

I'm using CakePHP 2.6.7 and copied the code to show flash messages from one controller to another, but it's not working in the second controller. In AdminsController: function login() { $this->loadModel('Admin'); $this->layout =…
3
votes
2 answers

Python: Cannot call method from imported module

I have a simple function to log a user in. It first comfirms whether the users details are correct; import user @app.route("/login/", methods=['POST', 'GET']) def login(): if request.method == 'GET': return…
user4154872
3
votes
1 answer

Flask: show flash messages in alertbox

I've been working on flask and I came across flash. It displays a message on page if flash was called on the server side. However, I'd like to display the contents get_flashed_messages() in an alertbox. I tried to make JS function and pass…
mini.1601
  • 157
  • 1
  • 2
  • 12