On Friday 29 May 2009 06:09:07 Amir Bilal wrote:
> Hi,
>
> I am fine with both the Zend_Form or plain HTML. But what I am not able to
> understand is: How I will be able to validate the form and show proper
> error messages and maintain the submitted values in case of invalid
> entries.
>
> One way that comes to my mind is that, I should validate the form and save
> it in registry and then use it from registry on the view.
>
> Any better ideas???

Create an action helper which return a Zend_Form instance which you just echo 
inside your view. The action helper also does the form submit handling. I had 
the exact same problem (comments on articles and videos, different modules) 
and I used the same action helper for the entire thing.

HTH.

>
> Best regards,
>
> On Thu, May 28, 2009 at 10:08 PM, Vadim Gabriel <[email protected]> wrote:
> > Hi,
> >
> > First you might want to check Matthews blog, He wrote a few posts about
> > forms and decorators.
> > http://weierophinney.net
> >
> > Second, As a ZF developer i hardly use the Zend_Form to generate my
> > forms. I usually do that myself using HTML. From various reason both
> > performance and usability. But one thing i can suggest is, If you plan on
> > having a login form across all pages then just create a view helper, That
> > helper will render a partial with the form you need and all other
> > contents in plain HTML. It will load faster and it's much eaiser then
> > working with the Zend_Form lables, decorators etc.. .  At least that what
> > i would do.
> >
> > Regards,
> > --
> > Vincent Gabriel.
> > Lead Developer, Senior Support.
> > Zend Certified Engineer.
> > Zend Framework Certified Engineer.
> > -- http://www.vadimg.co.il/
> >
> > On Thu, May 28, 2009 at 6:29 PM, Amir Bilal <[email protected]> wrote:
> >> Hi All,
> >>
> >> I have just started a new project in ZFW, and stuck in a problem.
> >>
> >> I have a form [Login Form] which is being displayed at right side of
> >> every single page of front end. I need to know that what is the
> >> appropriate method to make a form using Zend_Form. Will I have to make a
> >> plugin or something??/
> >>
> >> Your help in this regard will be much appriciated.
> >>
> >> Best regards,
> >>
> >> --
> >> ABC
> >> Rich Internet Applications Expert
> >> http://www.amirbilal.com
> >> Cell: +92.313.8524916
> >
> > --
> > Vincent Gabriel.
> > Lead Developer, Senior Support.
> > Zend Certified Engineer.
> > Zend Framework Certified Engineer.
> > -- http://www.vadimg.co.il/

-- 
Dado

Reply via email to