learing to work with zend framework, I am facing some minor problem.
I create a login form with Zend_Form, and then in my Controller I call my form in my controller
Here is the layout of my module
Module: compte
controller: compteController
Action: loginAction
In my application.ini I create a resource for my login route like this:
resources.router.routes.login.route = /compte/login
resources.router.routes.login.defaults.module = compte
resources.router.routes.login.defaults.controller = compte
resources.router.routes.login.defaults.action = login
I then call the login page like this exemple.com/compte/login the problem is that when validating the form, if the is an error the login page display again which is correct but with the total route exemple.com/compte/compte/login.
My question is that how can I correct this problem so that when the form is not valid the form re-display with correct address in the explorer.
Thanks in advance for your answer
What is the form’s action set to?
Maybe you need to do
$form->setAction('/compte/login');in the view or controller.