[pmwiki-users] ZAPdata savedata question

Aleksander Czaszynski aczaszyn at telus.net
Sun Nov 19 14:55:20 CST 2006


I tried the code with pmwiki-2.2.0-beta15 on linux box and it works as 
designed. Be carefull for the breaking line
> (:textarea name=FieldTextArea cols=28 rows=7:)(:keep
> {$FieldTextArea}:)(:textareaend:)\\
It must be on the same line like

> (:textarea name=FieldTextArea cols=28 rows=7:)(:keep {$FieldTextArea}:)
(:textareaend:)\\

Aleks

On Sunday 19 November 2006 09:31, The Editor wrote:
> William,
>
> I set it up on my machine and it worked like a charm with your exact
> code.  The logic was slightly off from what I think you wanted so I
> changed it so that when you click update it switches to the view
> screen.  That was a trick.  I thought about adding in a hide button to
> go back to the default but it got even more complicated quick.
>
> Anyway, I tinkered with it some and put up the code on my server under
> the Rolodex snippet.  You can check it out there if you want.
>
> http://www.fast.st/zap/pmwiki.php?n=Snippets.Rolodex
>
> As for why it's not working on your machine, I don't know.  You might
> just see if ZAP is working at all with some very simple form.  Then
> check to make sure you have the latest beta of PmWiki and ZAP.
>
> Hope this helps...  The revised code below.
>
> Cheers,
> Caveman
>
>
> _______________________
>
> (:zapdata:)
> (:zapget:)
> (:zapform:)
>
> (:if equal {$myaction} "View" :)
>
> ||border=0 cellspacing=0 width=200
> ||Name: ||{$Field1}
> ||Phone: ||{$Field2}
> ||Email: ||{$Field3}
>
> \\
> Address:\\
> {$FieldTextArea}
> (:ifend:)
>
> (:if equal {$myaction} "Update" :)
>
> ||border=0 cellspacing=0 width=300
> ||Name: ||(:input text Field1 {$Field1} size=35:)
> ||Phone: ||(:input text Field2 {$Field2} size=35:)
> ||Email: ||(:input text Field3 {$Field3} size=35:)
>
> \\
> Address:\\
> (:textarea name=FieldTextArea cols=28 rows=7:)(:keep
> {$FieldTextArea}:)(:textareaend:)\\
> (:input hidden savedata "Field1,Field2,Field3,FieldTextArea":)
> (:input hidden myaction View:)
> (:ifend:)
>
> (:if ! equal {$myaction} "Update" :)
> (:input hidden myaction {button}:)
> (:ifend:)
>
> (:input hidden passdata myaction:)
> (:input submit button "View":)
> (:input submit button "Update":)
> (:zapend:)
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users




More information about the pmwiki-users mailing list