Cancel message with nitrogen

I have a login page for my nitrogen based web application. If user authentication failed, I wf: start a message to the user to tell them. However, if the user continues to provide bad credentials, these Flash messages continue to build up. Is there a way to clear selected messages first before posting a new one?

+4
source share
2 answers

I was able to delete the original flash message by calling:

wf:update(page__flash, []) 

before updating with a new message (via wf:flash(Message) ). page__flash is the div identifier of the flash container, and I just set its contents to empty.

+6
source

notification item here: http://github.com/zaphar/nitrogen-elements/tree/master/src/element_notify/

It is an extended flash that allows you to set a timeout for a flash message and several other useful options. Perhaps this is what you are looking for.

+2
source

All Articles