1

Topic: ZC48 – Creating Custom Zend_Form Decorators

This little video tutorial should set you up for building your own custom Zend_Form decorators in 15 minutes. I'll show you how you can make the necessary class and have it easily added to your existing Zend_Form_Decorator configuration.

Grab a copy of the project or browse the repository.

2

Re: ZC48 – Creating Custom Zend_Form Decorators

What a great tutorial again. You know its quite the skill to be able to put yourself in our shoes and go thru how you discovered how things worked again for our benefit. Thats what I learn the most in your vids. I can interpret any piece of code and implement anything but I could use pointers on how to find out how ZF works. I admit I am instinctively afraid of looking thru all that code. But you make me realize how simple it all is in fact.

Anyways. One thing I noted in this video is how much work is involved in making those decorators as opposed to just writing a view-script for your form. Especially when you say it leverages the framework for business needs. Well if its one form in one project that I will never reuse I have a hard time justifying writing a set of decorators for it. The part of me that always wants to write good form code the standard way wants to write decorator but I work in a business and these things are never considered by the higherlevels.
I said how much more work I realise its not THAT much more and maybe I am missing something and it actually makes you deliver the product faster.

Oh well thanks again for the great video.

3

Re: ZC48 – Creating Custom Zend_Form Decorators

Agree with @iznogood. I used to use decorators and just do echo form in my view script. But when the form gets complex, I just lost myself in the decorators ... I now primarily use Zend_Form for my model validation. Form redering is left to my view helpers. I found this is not really a lot of duplication and it's definitely more designer-friendly.