Prevent form from closing and show error on action form submit
Is it possible to prevent the form from closing and display an error message when an action form submit fails? I want to run a DB transaction in
->after (or another similar lifecycle method), and if it fails I don't want the form to submit, but instead show what went wrong.Solution
Hmm I've been trying things out (throwing
in the wall pretty much haha). Not sure if this is better or worse?
It feels like there should be a better way of doing this
Anyway, if it works...Β―\_(γ)_/Β―
It feels like there should be a better way of doing this