Forms Fill in

Hi to All. I'm a begginer who discovered Phalcon 2 days ago.. and i'm studing..

I'm implementing a login form.

I can create the form with validators and filters.Nice.

I can check if the form is valid or not.

if (!$form->isValid($_POST))

But, let's suppose we have no valid _POST, how do i assign those values to the form for presenting them to the user for modification?

if (!$form->isValid($_POST)) { // let populate the form // then forward to the form page }

Thank you very much. Chris

Read more about security (form CSRF protection) over here:


yes, i will use ->security , but the problem is that i don't know how to pass POST data to my form again.. ready to be forwarded to the same action that generated the form.

Should i do it ciclying every element?


ok nevermind.. i see that form->isValid($this->request->getPost()) automatically fills in values.

Thank you Chris