I have a standard form, generated via cake/bake.
When the form is send, my controller checks a (trivial) condition,
- on condition A it just saves the data (patchEntity($foo, $this->request->getData())
- on condition B it should call a JS warning, and then save the data.
My favorite warning would be a Bootstrap4 Modal, but how can I call a modal in a controller? I know this kind of violates the idea of MVC. So, alternative ideas are welcome.
The only solution I see atm is that I redirect to a new action which just opens a modal.