[pmwiki-devel] Looking at ZAP - tutorial quirks?
The Editor
editor at fast.st
Sat Feb 3 20:57:08 CST 2007
On 2/3/07, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> I was looking at ZAP and the tutorial:
> http://www.fast.st/zap/pmwiki.php?n=Help.GettingStarted
>
> The example code below from that page
>
> (:zapdata:)
> (: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}
>
> has a few quirks that I ran into, and which I think should be mentioned
> (or fixed).
>
> The tutorial says the code will pre-poulate the fields with pre-existing
> data, but that doesn't work if the data contains spaces for instance.
>
> Changing the code to
>
> (:input text "Field1" "{$Field1}":)
> (:input text "Field2" "{$Field2}":)
>
> helps - I don't know if it is a full solution.
Oh, you are right. I didn't realize that was up there. I'll fix it.
Probably should put up a note in the tutorials also, as this is a
common mistake for new ZAP users...
> Also note that
>
> Field 1: {$Field1}
> Field 2: {$Field2}
>
> won't display very nice as linebreaks aren't preserved by default in
> PmWiki. (Nor should they in IMHO). Changing it to:
>
> (:linebreaks:)
> Field 1: {$Field1}
> Field 2: {$Field2}
>
> Gives you linebreaks for what follows.
Yes, true. Of course, this wasn't really about display... More about
showing how to get at the data.
> Another funny thing is that if I insert e.g. '(: :)' in a field, I get
> linebreaks between the fields and the submit button. I don't get this bit
> at all.
Try going to some page in the Test directory. I'm not sure what this
is all about either. But if you set up a test page, I'll take alook.
> If there is a testing area for ZAP I can create test cases for you there
> that illustrates these problems.
Thanks for taking a look Christian. I'll do my best to fix any
problems or bugs you notice.
Cheers,
Dan
More information about the pmwiki-devel
mailing list