[pmwiki-users] ZapForms and Input Select
The Editor
editor at fast.st
Tue Apr 10 14:58:09 CDT 2007
On 4/10/07, Nicholas Buttle <nicholas_buttle at yahoo.com> wrote:
> hi Dan
>
> I can't even get it working with a simple input box.
> I've lifted some code from your snippets but I'm
> probably mixing things up too much...the problem is in
> the passing of the variabale CPDName. If anything
> springs out at you as obviously wrong...holler. Ta
>
> Nick
>
> [[#ID]]
>
> ||border=0
> ||'''CPD List:''' ||{$:mylist}
>
>
> (:zapform:)
> (:messages:)
> (:input text CPDName '{($:CPDName)}':)
> (:input submit button "Add Me":) (:input submit
> button "Drop Me":)
> (:zap if1="equal '{button}' 'Add Me' ?
> mylist=+$:CPDName":)
> (:zap if2="equal '{button}' 'Drop Me' ?
> mylist=-$:CPDName":)
> (:zap mylist="":)
> (:zap savedata="mylist":)
> (:zapend:)
> [[#ID]]
>
>
> (:mylist: Box:)
>
Try this:
||border=0
||'''CPD List:''' ||{$:mylist}
(:zapform:)
(:messages:)
||(:input text CPDName '{$:CPDName}':) ||(:input submit button "Add
Me":) ||(:input submit button "Drop Me":)
(:zap if1="equal '{button}' 'Add Me' ? mylist=+{CPDName}":)
(:zap if2="equal '{button}' 'Drop Me' ? mylist=-{CPDName}":)
(:zap mylist="":)
(:zap savedata="mylist":)
(:zapend:)
If you have ZAPmarkups installed you can also do displays of your
lists. Swap one or the other of these with the top two lines just to
see what it does.
||border=0
||'''CPD List:''' ||{(list {$:mylist}|[[~{item}]] ^ | )}
'''CPD List:'''
{(list {$:mylist}|[[~{item}]] ^ [[<<]] )}
Or tinker with if you want something different. They're kind of fun!
Cheers,
Dan
More information about the pmwiki-users
mailing list