You definitely have to do a time cost analysis with it. If you're only going
to be doing a few forms, or you know most forms are not going to be styled
the same, it's probably going to be faster to use view scripts. On the other
hand (my case), if you know you're going to be created many, many forms,
styling them the same way, and reusing many common elements for the
foreseeable future, it will save you time to learn the intricacies and make
your own extensions. I started small, and just keep adding as I come across
functionality I want to have. These extensions have other functions in them
like, "myAddEmail()", "myAddName()" to setup elements that I use frequently.
I've even got some generic ones like "myAddText($name, $label, $decorators =
null, $attribs = null, $required = null, $form = null)" that allow faster
creation as well. I created a decorator function,
"myGetCustomDecorators($numberOfColumns, $thisColumn)" which adds html tags
with the proper classes to set up columns (static width floating divs).

Happy Coding,
James Ganong


On Thu, Sep 29, 2011 at 10:06 PM, David Muir <[email protected]> wrote:

> On 09/30/2011 02:11 AM, David Mintz wrote:
> > On Thu, Sep 29, 2011 at 2:24 AM, David Muir <[email protected]>
> wrote:
> >
> >> The way I handle forms is like this:
> >>
> >> <table>
> >>  <tr>
> >>    <td><?=$firstname->renderLabel()?></td>
> >>    <td><?=$firstname->renderViewHelper()?><br />
> >>      <?=$firstname->renderErrors()?></td>
> >>  </tr>
> >>  …etc…--
> >>
> > OMG! THANK YOU! It's reassuring to know that there are others out there
> who
> > have done the same thing I do. Decorators too painful for you? AVOID
> THEM!
> > You can still enjoy all the other many advantages of Zend_Form and move
> on
> > without clawing your eyeballs out.
> >
> >
> > David Mintz
> > http://davidmintz.org/
> > It ain't over:
> > http://www.healthcare-now.org/
> >
>
> I just found it to be the quickest way to work with forms, and saves you
> a ton of time. Having to set up filters and validators is hard enough,
> particularly when using a config array. Being able to use the default
> decorators where you want them is a huge time saver vs having to write
> your own and declare them for every single element.
>
> Cheers,
> David
>
>
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to