[Zope3-Users] Using zope.formlib for a search form
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Aug 9 22:20:35 EDT 2007
On Thursday 09 August 2007 22:14, Andrew Groom wrote:
> I've been battling with formlib for the last three days now and, while
> I've learnt a lot, it's nearly driven me crazy. I'm trying to use it to
> create simple search form, i.e., a form that does input validation,
> remembers the values you entered, etc., but is not tied to a persisted
> object.
>
> I've got the form rendering and processing requests, but I'm completely
> stuck on getting the form to remember the values I just entered after a
> form post.
>
> Has anyone got any suggestions ? Here's what I've got so far, the latest
> attempt being to use a dummy object to provide the context, which also
> doesn't seem to work:
Unfortunately, I cannot help you here, since I have been using z3c.form
recently (of course). z3c.form is better documented and provides the hooks I
think you are looking for here. For example, the context for the form --
called content within z3c.form -- can be overwritten by implementing a custom
``getContent()`` method. If you do that, you can store your info in a session
for example.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-users
mailing list