durusmail: quixote-users: form2: troubles from a get
form2: troubles from a get
2004-02-24
2004-03-10
2004-03-10
2004-03-10
2004-03-10
form2: troubles from a get
Daniel Chudnov
2004-03-10
Neil Schemenauer wrote:
> On Wed, Mar 10, 2004 at 01:33:13PM -0600, Jason E. Sibre wrote:
>
> out of the alpha state.  People should not develop a lot of code
> based on the current form2 package unless they are willing to
> maintain their own version of the package.

> We have started to use form2 for our own sites and have, in the
> process, realized many deficiencies of the current design.  I have
> some ideas on how to fix it but we have been busy on other things.

I'm rather partial to form2 so I've developed a fair amount of code
based on its current incarnation. ;)  Understanding, of course, that
it's alpha, and being prepared to rewrite as needed...  it would be
helpful to know which deficiencies you are particularly concerned about.
  Any chance you could enumerate those not already mentioned?


As for the get-submission problem, having seen it come up a few times
I'm confused about the particulars of this.  One of my forms is pre-fed
by a GET url like "/path/to/form?p1=foo&p2=bar".  The form also has a
submit button, added like this:

     form.add_submit('spam', 'spam')

Instead of just calling the canonical "if not form.is_submitted():
return render()", there are instead two possible calls to render():

     if not form.is_submitted():
         return render()

     if form.get_submit() != str('spam'):
         return render()

...so GET calls with the params listed above still drop back to render()
when is_submitted==True.

Am I missing a bigger-picture issue?  Perhaps this feels too much like a
hack to others?  Because to me it seemed like elegant, not insufficient,
design. :)

Thanks, -Dan


--
Daniel Chudnov
Yale Center for Medical Informatics
(203) 737-5789


reply