Hi I have some problem with the flash message
When my form is invalid i add the error message on flash (Direct Flash) they are not display in view. Here is my controller
$form = new SeriesForm();
$formClass = '';
$errorField = [];
try {
if ($this->request->isPost()) {
if ($form->isValid($this->request->getPost()) == false) {
foreach ($form->getMessages() as $message) {
$this->flash->error($message);
}
$errorField = $form->getErrorFiedsArray();
} else {
//Valid form, we create the series
}
}
} catch (Exception $e) {
$this->flash->error($e->getMessage());
}
$this->view->errorField = $errorField;
$this->view->formClass = $formClass;
$this->view->form = $form;
and here the view where I display the flash
<?php
echo $this->flashSession->output();
echo $this->flash->output();
?>
When I try with $this->flashSession->error($message);
the message is shown, but in that case, without redirect, Flash\Direct should work, right ?
Here is my phalcon versions
Versions:
Phalcon DevTools Version: 3.2.5
Phalcon Version: 3.2.2
AdminLTE Version: 2.3.6