Set flash message
See original GitHub issueI’m using Sprig for some Campaign subscribe/unsubscribe toggles like this:
<button sprig s-method="post" s-action="campaign/forms/unsubscribe" s-val:mailingList="{{ list.slug }}" s-val:email="{{ currentUser.email }}" s-target="#comms">
Subscribe/Unsubscribe
</button>
Is there a way I can set a flash message when doing it this way? In my other forms I’m doing {{ hiddenInput('successMessage', 'Success.'|hash) }}
.
Thanks for your support as always!
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
How to set a flash message in Yii2? - Stack Overflow
A flash message is used in order to keep a message in session through one or several requests of the same user. By...
Read more >How to Use Flash Messages in Rails - RubyGuides
A flash message is a way to communicate information with the users of your Rails application so they can know what happens as...
Read more >How to work with flash messages | Wiki | Yii PHP Framework
A flash message is used in order to keep a message in session through one or several requests of the same user. By...
Read more >Flash - 4.x - CakePHP Cookbook
FlashComponent provides a way to set one-time notification messages to be displayed after processing a form or acknowledging data. CakePHP refers to these ......
Read more >Application Layout and Flash Messages
We can set a flash message in the controller, which is stored as a temporary cookie on the user's browser.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep good shout. I’ll keep learning and playing. Thanks for your help @mattstein!
I second @mattstein’s suggestion of using JavaScript to make this work for your use-case.