Hi,

If you need to store certain messages across requests then you could use the
FlashMessenger helper. Or write something on your on that mimics it. Another
way is if you don't use Ajax to validate the form but redirect the member to
another page or the same page with the error shown you could use the
_setParam and _getParam to store and retrieve request vars between requests.
all submitted values will be available in the request object you can access
it trough $this->_getParam('form input name'); inside a controller that
extends zend_controller_action.
Another way will probably be is to store it as a class member in the view
class and then retrive it if it exists (though will not be available if you
redirect the member to another page).


On Fri, May 29, 2009 at 7:09 AM, Amir Bilal <[email protected]> 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???
>
> 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/
>>
>>
>>
>>
>
>
> --
> 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/

Reply via email to