[pmwiki-users] ZapCore / emty form after wrong captacha field or missing required

The Editor editor at fast.st
Sun Apr 29 16:45:49 CDT 2007


On 4/29/07, noskule <noskule at gmx.net> wrote:
> hi dan/list
> some more q about zap ...
>
> Is there a way to avoid that all fields are empty after submitting a
> form if a user didn't filed out a required field or submitted a wrong
> captcha?

Pm has said it will work this way in his forms processor but I have no
idea how it will do it.  Can someone suggest a way to keep values from
being deleted when a form fails some condition and the submission is
aborted?

> (:input /type/ required "<field1>,<field2>":)
> This field do only return a warning message, but don't stop the
> submission of the form? So to only submit the form after all fields are
> filled out correctly I have to use the if cond. (:zap if="...":)?

It is an order of processing problem.  Basically ZAP inputs are always
processed before POST inputs.  So it should work if you switch the
required field to a zap field as well. Also, it must appear early in
the form, before any other ZAP commands are executed.

> In your form exampe you use:
>
>   (:zapform key=note:)
> what key=note exactly do, or is there a docu about key=note?

See the info about multiple forms at
http://www.fast.st/zapbeta/index.php?n=Support-Tutorials/MoreAboutForms.
 Basically it is an id so ZAP inputs can be associated with specific
forms. It also sets the form name.

Cheers,
Dan



More information about the pmwiki-users mailing list