[pmwiki-users] fun with forms

Ben Stallings ben at interdependentweb.com
Thu Apr 19 18:04:15 CDT 2007


Patrick R. Michaud wrote:
> request=1 means load input defaults from whatever form submission might
> have led to the current one.  For example, if I fill out some fields
> in a form, hit submit, and some sort of processing error occurs that
> returns me back to the form, I want the fields to still contain
> whatever I had entered before.  (:input default request=1:)
> handles this.

Does this functionality, as the name implies, pull from $_REQUEST, which 
incorporates the contents of $_COOKIE as well as $_GET and $_POST?  If 
so, might it be useful to allow authors to specify which source(s) they 
want to import data from?  With UpdateForm I've found it not only useful 
but *vital* to be able to distinguish between GET data (which may come 
from links) and POST data (which only comes from forms).

I'm imagining something like
(:input e_form source=POST,{*$FullName},FormDefaults:)
to indicate that POST data (but not GET) is to be used first, followed 
by the current page, followed by a FormDefaults page in the current group.

>>   Does it apply only to the current form, or to all forms on the page? 
> Currently (:input default:) applies to all forms on a page.
> The first (:input default:) wins.

I hope you'll reconsider this one.  I realize that authors can always 
specify a field's values manually as {Group/Page$:var} (as we currently 
must do when using ZAP) but those of us developing complex query 
applications would find it very handy to be able to specify a different 
default source for each form in a page, and it's counterintuitive (at 
least to me) for the first tag to override all subsequent tags.  Maybe 
I'm just spoiled by CSS!

Again, great work, and thanks for letting us weigh in at this early 
stage in the process.  --Ben



More information about the pmwiki-users mailing list