Hi,

Apologies if this has been covered before, but I did search quite a bit and asked on IRC before posting!

As per general recommendations, in my code, I never produce any output on a posted page, but instead issue a redirect header. This prevents the back button breaking and people accidentally double posting things when doing so etc. Great.

In order to pass messages of the ilk "Update successful"/"Update failed", I use the Flash Messenger. Also great.

But I'd really like to pass the whole of the Zend_Form across with my messages so I can redisplay the form.

I can't see anything obvious in the docs to do this, so will I just have to build something similar to flash messenger (or extend it) to accept adding a form to it.

I presume due to the sub form support[1] and some other posts I've read[2], that Zend_Form is "session safe"?

If it's not I guess I'd have to store the ->getValues() (or ->getUnfilteredValues() and the ->getMessages()/->getErrors()/->getErrorMessages() and then pass then over, then set them on a recreated form with ->populate() and ->setErrors()/->setErrorMessages() or something like that.

(I'm a little confused as to what the differences are between ->getMessages()/->getErrors()/->getErrorMessages() are (and their set* counterparts. The API docs are far from clear on their use).

Any help/insights appreciated.

Cheers

Col

[1] http://weierophinney.net/matthew/archives/159-Zend_Form-Advanced-Features.html
[2] http://www.mail-archive.com/[email protected]/msg05573.html

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

Reply via email to