How can I add a form to my layout.phtml?
I would like to be able to have a search form and a login form that persists through every form on my site.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have a blog post explaining this: http://blog.zero7ict.com/2009/11/how-to-create-reusable-form-zend-framework-zend_form-validation-filters/
In your Application folder create a Forms folder
This is an example form:
You can then call it from your controller like this:
And display it from you view using
Hope this helps.
Edit: if you want this to be included on everypage you could create a new helper file
in your views folder create a helpers folder and create a loginHelper.php file
This could be output from your layout using: