I have considered extending the form element class to do the same thing. It didn’t make sense to me to use a decorator to attach markup that isn’t necessarily associated with a particular element… but for now I’m just dealing with it =)
If you plan on doing this, I wouldn’t make a new class for every type of markup, but just one that takes a parameter in the constructor. Also remember that for things like an HR, you might consider just using css to render a bottom border where the HR would go.
-mike tramontano
From: Paul Shoemaker [mailto:paul.shoemaker@helloecho.com]
Sent: Thursday, October 16, 2008 12:02 PM
To: Zé Luis
Cc: fw-mvc@lists.zend.com
Subject: Re: [fw-mvc] newbie question about Zend Form
While that is certainly a way to do it, you may want to take a look at form decorators. There is a fantastic article about decorators at: http://devzone.zend.com/article/3450-Decorators-with-Zend_Form
hope this helps
--
Paul Shoemaker | LAMP Developer
paul.shoemaker@helloecho.com
echo | Hello. Hello. | helloecho.com
The information contained in this message is intended only for the use
of the individual or entity named above. If the reader of this message
is not the intended recipient, or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this communication is
strictly prohibited.
Please consider the environment and do not print this email unless necessary.
On Oct 16, 2008, at 10:54 AM, Zé Luis wrote:
Hi!
This is probably a stupid newbie question, but please be patient.
I have a very long form and I would like to insert some html between elements (an <hr> for instance).
The way to do this is to Extend Zend_Form_Element for each different peace of HTML I want to add ?
Pear quickform had a html type of element and I just added whatever I wanted. Is there a way to do this width zend_form ?
Thanks.
Jose Luis
没有评论:
发表评论