We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Flash old input

When I search google with keyword "flash old input phalcon", it lead me to "http://forum.phalcon.io/discussion/1918/keep-old-inputs" but Phalcon\Tag didn't use Flash Session.

My way is hook HTTP Request then save variables in Flash Session. Anyone have a idea to resolve this trouble ?

edited Nov '14

I know it's an old thread but I have been trying to flash old inputs for ages now and finally found a workaround. However it's really ugly and I was wondering if anyone has any better solution?

In the post submit action

            foreach($this->request->getPost() as $key=>$msg)
                    $this->persistent->$key = $msg;
                return $this->response->redirect('/submit');

In get action


It will set input fields with old values and deletes them after refresh.