To create a ZAP form, just sandwich standard text boxes, password boxes, radio buttons, checkboxes, whatever between the (:zapform:) and (:zapend:) markups. When you submit the form, the ZAP processing engine is called, and depending on your field names and values, various actions are triggered. Here is how to set up a simple form to save data:
(:zapform:) (:input text Field1:) (:input text Field2:) (:input hidden savedata "Field1,Field2":) (:input submit value="Zap it!":) (:zapend:)
If you want to look at the ZAP data, just edit the data page.
To display data in a page, retrieve them as normal PmWiki text variables. For example:
Field 1: {$:Field1} Field 2: {$:Field2}
{Group.Name$:Field}
To update a form field, you simply prepopulate it with existing data and then resave any changes. Only fields you specify to be saved will be updated. Here is an example combining lines from the examples above:
(:zapform:) (:input text Field1 "{$:Field1}":) (:input text Field2 "{$:Field2}":) (:input hidden savedata "Field1,Field2":) (:input submit value="Zap it!":) (:zapend:) Field 1: {$:Field1} Field 2: {$:Field2}
Click here for part two of this tutorial: More About Forms.