I have a problem with aligning my legends in forms, and reading the decorator documentation did not exactly make it much clear for me how i can replace the tag with a normal .
Does anyone know how this can be done?
Thanks.
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.
EDIT
I’m very sorry, I was still thinking about label, not legend. To replace legend tag (which is generated when you’re using subforms or manually add
fieldsetdecorator to your form and call$form->setLegend('some')) with another one, you have two options.Write your own
fieldsetview helper (Zend_View_Helper_Fieldset), and put it into your application helpers directory. It will force ZF to take your helper instead this one located in library folder. In that original helper you have:You can replace legend tag with div in your helper and it will work.
Second way to achieve that, is just add HtmlTag decorator to your Zend_Form element instance. Look here, it’s great tutorial how to use decorators in ZF: http://devzone.zend.com/1240/decorators-with-zend_form/
Sorry for misleading you at the beginning 🙁