I have a login page for my Nitrogen based web app. If user authentication fails I wf:flash a message to the user to let them know. However if the user continues to supply bad credentials these flash message keep building up. Is there a way to first clear the flashed messages before posting a new one?
I was able to remove the original flash message by calling:
wf:update(page__flash, [])
before updating with the new message (via wf:flash(Message)
). page__flash
is the id of the flash container div, and I just set it's content to be empty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With